Victor Wembanyama scored eight of his 18 points in overtime to ensure France edged Japan 94-90 to maintain their unbeaten start at the Paris Olympics.
Japan looked set to cause an unlikely upset against the hosts, but Matthew Strazel's four-point play with 10 seconds of the fourth quarter remaining spared their blushes.
"The shot of his life," Wembanyama said on Strazel's shot that sent the game into overtime at the Pierre Mauroy Stadium in Lille.
Wembanyama then took centre stage, scoring the first eight points of overtime to give France a 92-84 cushion.
Japan would battle back and got to within two points of their opponents, but the home team were able to close out the contest at the free throw line.
Wembanyama also finished with 11 rebounds and six assists, and recalled the moment when the encounter changed in overtime.
"The realisation, the dynamic of the game," Wembanyama said.
"They were playing like underdogs and we were waiting for them to punch a little bit too much. I wanted to make a point and punch first in overtime. And it worked."
France remained in second place in Group B behind fellow unbeaten nation Germany, with the pair squaring off this Friday to see who will finish on top.
Dennis Schroder starred for Germany in the final game on Tuesday, as the Brooklyn Nets point guard notched 20 points and six assists in their 86-73 win over Brazil.