France narrowly defeated Slovenia in the Tokyo Olympics men’s basketball semifinals matchup, 90-89.

Nic Batum played the role of savior in the final seconds.

CLICK HERE FOR MORE SPORTS COVERAGE ON FOXNEWS.COM

Slovenia’s Luka Doncic passed the ball to Klemen Prepelic with less than 10 seconds remaining in the game. Prepelic took the ball to the hoop and thought he had an easy lay-up until Batum tracked him down in the key and swatted the shot.

The game-saving block was what France needed to hold on for the victory.

Nando De Colo led the way for France with 25 points, seven rebounds and five assists. Evan Fournier, who is reportedly set to sign with the New York Knicks, had 23 points, five rebounds and three assists.

US MEN'S BASKETBALL TEAM ADVANCES TO GOLD MEDAL GAME AFTER BEATING AUSTRALIA

Batum, who is reportedly set to rejoin the Los Angeles Clippers, only had three points but contributed more in other areas. He had four blocks, including the game-saver, and five rebounds.

Slovenia, who won the EuroBasket, suffered its first loss in its last 18 games.

Doncic recorded a triple-double in the loss. He had 16 points, 10 rebounds and 18 assists. Mike Tobey added 23 points and eight rebounds.

The Dallas Mavericks superstar was clearly upset after the game and was seen being consoled by French players afterward in a great showing of sportsmanship.

CLICK HERE TO GET THE FOX NEWS APP

France will play the U.S. in men’s gold medal final. Slovenia will play Australia for bronze.