Feature photo: Cory Joseph (right) celebrates his game winning shot on Saturday, September 12, 2015 in the FIBA Americas bronze medal game. 

Canada will leave Mexico City with the bronze medal after beating Mexico 87-86.

Cory Joseph hit a jumper in the final second to secure the win. Andrew Nicholson had a team-high 20 points and added three rebounds. Andrew Wiggins had 18 points. It’s hardly consolation, but Canada ends the tournament on a winning note and with an 8-2 overall record. They just lost the wrong game (more below).

As the third through fifth-placed teams, Canada, Mexico, and Puerto Rico will attempt to qualify for Rio at a last-chance tournament July 5-10, 2016.

FIBA Americas semifinal: Canada 78-79 Venezuela

CIUDAD MEXICO, MEXICO - September 3 2015- Canada vs Venezuela game during the 2015 FIBA Americas Championship at the Palacio de los Deportes. (photo: Hugo Avila/FIBA Americas/Imago7)

CIUDAD MEXICO, MEXICO – September 3 2015- Canada vs Venezuela game during the 2015 FIBA Americas Championship at the Palacio de los Deportes. (photo: Hugo Avila/FIBA Americas/Imago7)

Canada’s basketball renaissance received a major blow on Friday night in Mexico City.

Despite being heavy favourites Canada lost 79-78 to Venezuela on a free throw in the final seconds, missing out on a chance to qualify for Rio 2016.

The Canadians fumbled all night. But the ending was the most surreal.

With the game tied at 78 and 24.1 seconds remaining the Venezuelans would inbound the ball and run down the clock, but miss on their final possession. Yet instead of overtime there was deliberation between the officials resulting in a foul call on Aaron Doornekamp sending Gregory Vargas to the free throw line. He hit the first, intentionally missed the second and that’s all the Venezuelans would need to complete the upset.

Cory Joseph had five points, four assists, and three rebounds against Venezuela.

Cory Joseph had five points, four assists, and three rebounds against Venezuela.

It was an ending no one could have imagined, “It shouldn’t have came down to that,” a distraught Cory Joseph told TSN after his team squandered a seven-point lead with 3:19 to go.

The foul on Doornekamp came as his jostled Gregory Vargas off his feet with the rebound well out of reach, “If I had to comment on the last call I would say it’s crappy,” said Joseph, “I don’t ever bash officials, I don’t ever try to complain but in my opinion he takes a shot, the ball bounces up twenty feet, time expires…to call that call,” continued Joseph, with a emotional mix of disbelief and disappointment.

The Canadians were awkward from the beginning. Despite beating the Venezuelans 82-62 back in the round-robin they came out flat and Venezuela was ferocious. Only Kelly Olynyk would offer hope with 11 points (of his game high 34) in the first 10-minute quarter as Canada trailed 20-19.

Olynyk shot 85% from the field and added 13 rebounds. He was great offensively, but also plagued by turnovers. He had six of those, the most by anyone in the game.

Kelly Olynyk goes up for two against Venezuela at FIBA Americas on September 3, 2015.

Kelly Olynyk goes up for two against Venezuela at FIBA Americas on September 3, 2015.

Almost five-and-a-half minutes into the second quarter, and down by two, Canada flashed their offensive teeth and went on an 8-0 run before six-straight turnovers helped Venezuela climb back in-front 38-37 on Heissler Guillent three-ball at the buzzer.

Canada gave away the ball 10-times in 20-minutes and 17-times by game’s end, blasting their tournament-long average of 12 turnovers per game. Venezuela had the tenacious energy of their expressive coach ‘Che’ Garcia. They wanted it more.

The Canadian fear truly settled in during the third quarter. A pro-Venezuelan crowd got into it, and Che Garcia’s pacing up and down the court urged his team to a five-point lead late. Yet after three quarters Canada would have their first lead at a horn, 60-58.

Andrew Wiggins goes up for a shot against Venezuela at FIBA Americas on September 3, 2015. He had nine points in the semifinal.

Andrew Wiggins goes up for a shot against Venezuela at FIBA Americas on September 3, 2015. He had nine points in the semifinal.

Venezuela would gain 14 points off turnovers and make 40% of their field goals. Canada meanwhile shot 48% from the field, and outrebounded 35-28.

Venezuela will play Argentina for FIBA Americas gold on Saturday, with both finalists securing berths for Rio 2016. Mexico and Canada will play for bronze.

Mexico, Canada, and fifth-place Puerto Rico still have a shot at Rio 2016 through a final Olympic qualifying tournament in July 2016.

Canada hasn’t made the Games since Sydney 2000.

The Canadians arrived at the semifinal game after winning seven-in-a-row following a tournament opening loss to Argentina. They narrowly emerged from the preliminary and second round as the first-seed, setting up the game against fourth-place Venezuela.