Mexico's Mayra Pelayo-Bernal celebrates with her teammates after scoring a goal against the US.
CNN  — 

The US women’s national soccer team fell to a shock 2-0 defeat against Mexico in the group stages of the Concacaf W Gold Cup on Monday, stunning the soccer world.

The surprise result, capped off by a superb goal from ​​Mayra Pelayo-Bernal, is just the second time Mexico has beaten the US in 43 fixtures, with its only previous victory coming back in 2010.

Despite its setback, the US still progresses to the quarterfinals of the tournament, after finishing second in Group A behind La Tri.

The US won its first two games with ease, thrashing the Dominican Republic and then Argentina, and many had expected the soccer powerhouse to finish the group unbeaten but an in-form Mexico side thought otherwise at Dignity Health Sports Park in Carson, California.

In truth, the US is in a rebuilding phase after last year’s World Cup disappointment and had made seven changes from the team that started in the 4-0 win over Argentina on Friday. However, it makes Mexico’s victory no less impressive.

“It just shows how far the game is coming and there’s no easy games anymore,” US interim head coach Twila Kilgore told reporters after the game.

“If we don’t take care of business and we don’t execute, this is to be expected and we’ll step up and take ownership of that.”

The US still qualifies for the quarterfinals as Group A runner-up.

Mexico’s Lizbeth Ovalle scored the opening goal in the 38th minute, capitalizing on a defensive error from Becky Sauerbrunn before finding the back of the net with a brilliant chip over Alyssa Naeher in the US goal.

In search of an equalizer, Kilgore substituted star striker Alex Morgan into the game at half-time, but the team couldn’t find a way to break down Mexico’s resilient defense.

Instead, Mexico put the icing on the cake with a brilliant goal in the final moments of the match, as Pelayo-Bernal launched a long-range effort into the top corner of the net.

It came after a fantastic, cross-field pass from Karen Luna but Pelayo-Bernal still had plenty to do herself.

La Tri coach Pedro López said he was proud of his players but added his side cannot be satisfied with just beating the US.

“I insist that, for us, it would be of no use if in the next game we lose the quarterfinals and we go down in history as the team that only beat the United States one day,” he told reporters, according to ESPN.

Both Mexico and the US will have to wait to discover who their quarterfinal opponents will be, with those knockout matches being played at the weekend.