Canada is moving on to the semifinals at the FIBA Men's Basketball World Cup for the first time ever.

Shai Gilgeous-Alexander had 31 points and 10 rebounds in Canada's 100-89 win over Slovenia on Wednesday at the Mall of Asia Arena.

RJ Barrett added 24 points and nine rebounds. Dillon Brooks had 14 points before leaving the game with 7:06 left in the fourth quarter after picking up a second technical foul.

Luka Doncic led Slovenia with 26 points. He left the game less than a minute after Brooks, also having picked up a second technical.

Slovenia trailed by 17 points with 5:36 left in the fourth quarter but cut it to nine behind an 8-0 run with 3:34 remaining.

However, Gilgeous-Alexander responded with a leaning pull-up jumper 25 seconds later. Despite missing the free throw to follow, he made two others less than a minute after to help Canada pull away.

Canada will next play Serbia on Friday morning. Germany, which beat Latvia 81-79 on Wednesday, will take on the United States in the other semifinal on Friday.

Medal games are scheduled for Sunday.

Canada's previous best result at the tournament were a pair of sixth-place finishes in 1978 and 1982.

Serbia reached the final in 2014 and has earned semifinal berths at three of the last four editions of the tournament.

It will be the first time that Serbia and Canada have played at the event.

Canada qualified for the 2024 Paris Olympics on Sunday with an 88-85 comeback victory over top-ranked defending champion Spain.

Canada's men's team hasn't played at the Summer Games since the Sydney Olympics in 2000.

This report by The Canadian Press was first published Sept. 6, 2023.