Slovenia overcame a 17-point deficit midway through the third quarter to stun France 83-81 at the U18 European Championship Men in Hagondange, France.
With the win, the Slovenians top Group A while France dropped to third.
The host nation led 43-35 at half time and that advantage grew to 17, 56-39, on a Fabien Paschal basket with 5:14 left in the third quarter.
Slovenia though did not relent and, thanks to the timely scoring punch provided by the pair of Nejc Buda and Mitja Nikolic Smrdelj, were back within six, 63-57, as they headed into the final frame.
The Slovenians tied the game at 68 all on a pair of Edo Muric free-throws with 6:18 to go and went back in front - taking a lead they would not relinquish again - for the first time since the end of the first quarter courtesy of Klemen Panic with 4:32 left to play.
France tied the game at 70 all on Leo Westermann's lay up two minutes later, but Klemen Panic and Muric hit two big three-pointers that gave Slovenia a 80-74 cushion with just over a minute to go.
Evan Fournier and Westermann got the hosts back within one, 82-81, on the latter's three-pointer with 38 seconds remaining, but France had to foul to stop the clock and even though Marko Pajic missed two to give Les Bleus a small chance, Smrdelj hit one of two free-throws at the death to seal their opponents' fate and leave the home fans stunned.
Early on, the game was close with the teams trading the lead in the first quarter with Slovenia standing on top, 19-18 going into the second quarter.
But Bourdillon and Nicolas Wachowiak got France back in front 25-19 and the host nation soon pushed that advantage to double-digits, 39-28, on a very unique possession.
Bourdillon hit a three-pointer and at the same his team-mate Chrislain Cairo was fouled. He was sent to the free-throw line, hitting on the first attempt but missing the second. However, France grabbed the rebound and Fabien Paschal made a lay up.
Muric finished with a double-double of 15 points and 10 rebounds. Chrislain Cairo had a game-high 17 points for France.