TORONTO - Canada used a balanced attack to defeat Mexico 96-76 Thursday and move within one win of a first ever medal in Pan American Games men's basketball play.

Brady Heslip, who scored the first 10 points of the fourth quarter for Canada, led with 20 points. Three other Canadians finished in double figures.

Orlando Mendez led Mexico with 24 points.

Canada (3-0) came into the game having already secured a semifinal berth and knowing it had won Pool B barring a total collapse against the Mexicans (1-2). Argentina's earlier 80-70 win over the Dominican Republic left both teams at 1-2 and unable to catch Canada in the pool.

Canada will play the loser of Brazil versus the U.S., who met in the late game, in semifinal play Friday. The Brazil-U.S. winner will play Pool B runner-up Dominican Republic in the other semi.

The result means the Canadian men will at least equal their best performance at the Games — fourth in 1983. The Canadian women's basketball team struck gold here Monday.

Mexico won silver four years ago on home soil in Guadalajara and has three silvers and one bronze overall.

There were a few empty seats at the Mattamy Athletic Centre but the crowd was vocal in its support for the home team.

Canada had foul trouble in Wednesday's win against Argentina and it looked like more of the same when Andrew Nicholson got two early fouls, including a technical, and went to the bench. But a 17-0 run late in the first quarter that saw the Mexicans miss seven straight shots, make three turnovers and commit five fouls had the Canadians ahead 27-16 going into the second.

A sloppy second quarter for both sides didn't change much, with Nicholson and Melvin Ejim exiting late in the going after drawing a third foul. Canada led 49-39 at the half.

Anthony Bennett was high-scorer for Canada with 10 points, seven via free throw, and seven rebounds in the half.

Canada extended the lead to 21 in the third as Mexico missed its first nine shots of the quarter. The Mexicans were down by 14 going into the final quarter.

Mexico is ranked 19th in the world compared to No. 25 for Canada although the numbers don't mean much here given most countries are not fielding their top squads.

Hector Hernandez and David Meza, who suffered knocks in Mexico's opening win against Argentina, did not see action.

Puerto Rico beat Venezuela 89-72 in the other early game.

Follow @NeilMDavidson on Twitter