Trinidad and Tobago sealed top spot in Group C after a goal deep into stoppage time from defender Yohance Marshall salvaged a breathtaking 4-4 draw against Mexico at the CONCACAF Gold Cup.
Mexico thought it had the match in Charlotte wrapped up when Trinidad and Tobago's Kenwyne Jones unfortunately sent the ball past his own goalkeeper in the 89th minute, having seen Andres Guardado equalise just seconds earlier.
But Trinidad and Tobago had other ideas as Marshall rose highest in the fourth minute of injury time to earn a share of the spoils at Bank of America Stadium.
Trinidad and Tobago had come from two goals behind earlier in the second half.
Goals from Paul Aguilar and Carlos Vela on either side of the break had El Tri in control at 2-0.
However, a Keron Cummings brace and Jones' side-footed volley in between put the Caribbean nation ahead, before three goals in the closing stages saw the match end all square.
Trinidad and Tobago (seven points) will now face Panama in the quarter-finals, while Mexico (five points) and Costa Rica will go head-to-head in the last-eight.
USA will take on Cuba in the opening quarter-final match-up while Haiti will meet Jamaica.
With the ink barely dry after signing a deal to join Los Angeles Galaxy, Giovani dos Santos returned to the starting line-up at the expense of Oribe Peralta, while Yasser Corona also came into the team, with Jose Vasquez making way following Mexico's dour goalless draw against Guatemala.
Injury and suspension robbed keeper Jan-Michael Williams (hamstring) and midfielder Andre Boucaud (accumulation of yellow cards) of a spot in Charlotte as Trinidad and Tobago made six changes after it's 2-0 victory over Cuba.
Coach Miguel Herrera had called for more aggression from Mexico heading into the Group C finale and the message rubbed off on his players as they dominated proceedings from the outset.
The return to a 5-3-2 formation also worked wonders as the Mexicans were rewarded for their efforts with a 32nd-minute opener.
Aguilar struck after the unmarked full-back popped up at the back post to convert a deflected cross through the legs of Marvin Phillip.
Dos Santos almost doubled Mexico's lead three minutes shy of the interval, but after weaving his way past two defenders, the former Villarreal striker was unable to direct his shot on target.
Fans barely had a chance to retake their seats after the break as Trinidad and Tobago came from two goals down to hit the front.
Half-time substitute Peralta, who replaced Dos Santos, wasted a gilt-edged chance to extend Mexico's lead as he headed over the crossbar in the 48th minute, though Vela made no mistake three minutes later.
The Mexican forward cut inside his opponent and scuffed his shot in off the post and past Phillip.
That sparked Trinidad and Tobago into action as Jones set up Cummings in the 55th minute, powering past three defenders and playing in his team-mate, who poked the ball into the net.
Vela came within a whisker of restoring Mexico's two-goal buffer just seconds later and Trinidad and Tobago capitalised on their opposition's missed opportunity.
Jones equalised via a powerful side-footed volley in the 58th minute and the Cardiff City striker turned provider again nine minutes later, chesting the ball down for Cummings, who unleashed a ferocious shot into the top corner of the net from a tightish angle.
There was still plenty of action to come as Guardado equalised in the 88th minute, before Jones went from hero to villain as he netted an own goal in the final minute of regulation.
But Marshall spared his team-mate's blushes courtesy of a powerful header across Guillermo Ochoa from a corner.