Mexico hung on for a nervy 2-0 victory against already-eliminated Curacao to win Group C in its Gold Cup round-robin finale on Sunday in San Antonio, Texas.
Coming off a lackluster 0-0 draw with Jamaica in its second group match, Mexico were in need of a good showing and three points in order to top Group C.
And after a slow start in the first 20 minutes -- that included two quality chances for Curacao -- Mexico finally scored a goal with Angel Sepulveda's perfect header at the far post from a Raul Lopez cross.
Sepulveda had a chance at his second just before the half-hour mark, settling a poor Curacao clearance and lashing a line-drive volley that Eloy Room did well to save.
Curacao opened the second half on the front foot, with Aston Villa's Leandro Bacuna going close with a headed shot in the 53nd minute.
Jesus Corona then faced a flurry of activity in the 55th minute, denying Bacuna from close range before just tipping a volley from the rebound over the bar.
Mexico substitute Elias Hernandez had two chances to double his team's lead, but a right-footed shot in the 81st minute and a close-range header shortly after were both turned away by Room, who was stellar in the Curacao goal.
Edson Alvarez sealed the win for Mexico in second-half stoppage time, collecting a loose ball in the Curacao area and calmly slotting home past Room to secure the points and top spot in the group.
Mexico will face Honduras in the quarterfinals on Thursday night in Glendale, Arizona.
Jamaica and El Salvador are both through to the knockout rounds after playing to a 1-1 draw ahead of the Mexico match.
El Salvador -- needing at least a point to book passage to the quarterfinals -- had the perfect start when Ruben Marroquin opened up the Jamaica defense with a perfect through ball and Nelson Bonilla finished from a tight angle to make it 1-0 early.
Derby Carrillo saved Jamaica's best chance of the first half in the 37th minute, diving low and to his right to deny Romario Williams from close range from a Alvas Powell cross.
Andre Blake had a crucial save of his own in the 60th minute, reacting quickly to a crushing, left-footed shot from Rodolfo Zelaya to keep the Reggae Boyz within a goal.
Four minutes later, Jamaica were back on level terms from a Darren Mattocks penalty that beat Carrillo after Narciso Orellana was whistled for handball and shown a yellow card.
The result, combined with Mexico's win, means Jamaica finish second in the group and puts El Salvador through as one of the best third-place finishers.