Yohance Marshall scored in the 93rd minute to hand Trinidad and Tobago a 4-4 draw against Mexico and confirm their place as winners of Group C in the Gold Cup on Wednesday evening.
Miguel Herrera's team were the first to threaten when Paul Aguilar collected a pass from Miguel Layun, but his strike was well saved by Marvin Phillip.
El Tri took the lead in the 32nd minute as Carlos Vela lifted a cross to the back post for Aguilar, who made no mistake this time in dispatching the ball past Phillip.
In the second half, Mexico doubled their advantage when Vela got on the scoresheet when he was released by Andres Guardado and beat Marshall with a swift piece of skill before rifling the ball into the net with the aid of the post.
The Soca Warriors responded immediately when Keron Cummings picked up a loose ball outside the area and beat Guillermo Ochoa with a low drive into the bottom corner.
Vela had the chance to restore his side's two-goal advantage when he was played through one on one with Phillip, but he curled his effort past the post from close range.
Trinidad made him pay for his miss when Kenwyne Jones netted an equaliser as Cordell Cato fired a ball across the face of goal and the forward guided his strike past Ochoa.
Stephen Hart's side took the lead minutes later when Cummings netted his second goal of the game out of nothing as he volleyed the ball first time from a tight angle from the edge of the box, and his shot soared past Ochoa into the top corner.
Mexico pressed to get back into the game, needing two goals to reach the top of Group C. Guardado gave them hope late in the match when he raided forward, and despite taking a poor first touch on the edge of the box, he made up for it with his second as he powered a swerving volley past Phillip.
Herrara's side pushed forward in numbers looking for the crucial goal, and were rewarded for their pressure when Layun's cross into the box was turned into his own net by Jones in the 90th minute.
However, there was one final twist to the tale when Joevin Jones lifted a corner into the box with the final act of the match, and Marshall met the ball with a powerful header which found the bottom corner to earn Trinidad the point.
As a result of topping Group C, Trinidad will face Panama in the quarter-finals of the competition, while Mexico will face Costa Rica.