Goalkeeper Guillermo Ochoa saved a sudden death penalty as Mexico edged Costa Rica 5-4 on penalties to reach the CONCACAF Gold Cup semi-finals in Houston, Texas on Saturday.
Ochoa stopped Costa Rica's Keysher Fuller after the teams played to a 1-1 draw following extra time in front of 70,788 fans at NRG Stadium.
Mexico will now face Haiti in the semi-finals on Tuesday in Glendale, Arizona.
Costa Rica goalkeeper Leonel Moreira saved Raul Jimenez's first penalty in the shoot-out, but Randall Leal smashed Costa Rica's third penalty wide, setting the stage for Ochoa to send Mexico through by stopping Fuller.
Jimenez handed Mexico the lead in the 44th minute, with Bryan Ruiz levelling from the spot for Costa Rica eight minutes later after Joel Campbell was judged to have been brought down by Luis Rodriguez inside the area.
Television replays later showed that the foul was outside the box.
Mexico manager Gerardo "Tata" Martino will be suspended from the touchlines for the semis against Haiti after he was slapped with his second yellow card of the tournament.
In the other fixture, Haiti -- one of the biggest surprises of the tournament after winning all its games in the group stage -- scored three second-half goals to stun former champions Canada 3-2 and advance to the last four for the first time.
Duckens Nazon got the comeback started by scoring in the 50th minute and Herve Bazile brought the sides level from the penalty spot in the 70th, with both goals coming courtesy of some sloppy defensive play by Canadian defender Marcus Godinho.
And six minutes later Wilde-Donald Guerrier sealed victory for Haiti with a spectacular individual effort, sneaking past the Canadian defence then bouncing the ball twice in the air before tapping it past goalkeeper Milan Borjan.
Jonathan David and Lucas Cavallini scored for Canada, who were guilty of complacency once they had built up their lead.
It was a gut-wrenching loss for the Canadians who won this tournament in 2000 but haven't made it to the semis since 2007.