Hosts United States beat Panama 1-0 to clinch first place in Group D at the Confederation of North, Central American and Caribbean Association Football (CONCACAF) Gold Cup.
Jozy Altidore's spectacular overhead kick from close range secured the win for the US, who needed only a draw to take top spot, at Children’s Mercy Park in Kansas City.
They will now meet Curaçao in the quarter-finals on Sunday (June 30), while runners-up Panama will play Jamaica for a spot in the last four on the same day.
Altidore had the first clear-cut chance in the 21st minute, forcing a fine save from goalkeeper José Calderón.
José Fajardo proved a handful for the US in the first half, the forward getting in behind the backline on a number of occasions.
But it was the home nation that took the lead in the 66th minute in rather theatrical fashion.
Just moments after head coach Gregg Berhalter had brought Christian Pulisic off the bench, it was Altidore who stole the show.
A passage of play was kept alive by Matt Miazga, who headed a corner-kick back toward the goalmouth and a misplaced Panama clearance led to Altidore’s acrobatic finish.
Today's other Group D match between already-eliminated Trinidad and Tobago and Guyana ended in a 1-1 draw.
The result earned Guyana their first point in any CONCACAF Gold Cup.
The breakthrough for the South Americans came in the 54th minute when Neil Danns cut in from the left and bent a shot into the far corner from just inside the 18-yard box.
It was his third goal of the tournament, having also scored a brace against Panama last Saturday (June 22).
Kevin Molino equalised 10 minutes from time when he rounded goalkeeper Quillan Roberts and tapped home from an acute angle.
Both teams finished the tournament with one point, with Guyana ahead in third place on goal difference.
Action is due to resume on Saturday (June 29) with the first two quarter-finals.
Haiti face Canada before Mexico go up against Costa Rica.