Jenier Marquez scored in stoppage time to seal Cuba's place in the quarter-finals of the CONCACAF Gold Cup with a 4-0 win over Belize on Tuesday.
Ariel Martinez completed a hat-trick for Cuba but it was Marquez's last-gasp goal that took them through to the last eight of the Confederation of North, Central American and Caribbean Association Football regional tournament.
The Cubans needed to win the Group C match by at least four goals to advance as one of the two-best third-place teams in the competition.
Cuba led 1-0 at halftime after Martinez opened the scoring on 37 minutes then 2-0 midway through the second when the striker added a second.
There were just seven minutes of regulation time left when the 27-year-old Martinez finished off his hat-trick at Rentschler Field in East Hartford, Connecticut.
The match was into injury time when veteran defender Marquez scored the crucial goal, enabling Cuba to leapfrog Martinique, who finished third in Group B, into Saturday's quarter-finals against Panama.
The final match of the group stage will be played later on Tuesday when the United States tackles Costa Rica.
Both teams have already qualified for the quarter-finals but the result will determine which team finishes top of the Group C standings.
(Reporting by Julian Linden in New York; Editing by Greg Stutchbury)