Panama kept up their 100 per cent record at the 2016 FIBA Centrobasket to book a clash in the semi-finals against defending champions Mexico.
With the scores tied at 63 late in the fourth quarter, Panama responded with nine unanswered points to set up a 76-71 win over Cuba.
The win means the hosts finish top of Group A and will face Mexico - who edged the Bahamas 84-81 - for a spot in the final.
In the other semi-final, the Dominican Republic will face Puerto Rico, after the former sealed top spot in Group B with a 75-69 win over the U.S. Virgin Islands.
Puerto Rico meanwhile thrashed Antigua and Barbuda 117-66.
All four semi-finalists also booked a spot in America's Division A of FIBA's New Competition System
The Virgin Islands and Cuba will fight for fifth place in the Centrobasket, with the winner securing the last ticket for America's Division A of FIBA's New Competition System.