Spains Jaime Fernandez launches the game winner over Israels Rafael Menco
Jaime Fernandez made a floating lay-up 0.69 seconds before the final buzzer to give Spain a 63-61 victory and deny Israel the chance to chase into overtime a 20-point win that would earn them a place in the Second Round.
Although Israel only led by as many as three points on Saturday and never came close to the magical margin that would allow them to advance to the next phase at the expense of Spain, they pushed their famous rivals to the ropes throughout the encounter.
As it turned out, Spain took second place in Group C behind unbeaten Latvia and Russia will follow them into the Second Round from third spot, while Israel and Bulgaria will have to enter the relegation battle at the Sportland U20 European Championship.
Spain led for 34 minutes on Saturday but were never comfortable as they were lacking alternative options on offence - Fernandez and Daniel Diez combined for 45 of the Iberian side's 63 points.
Israel meanwhile matched Spain on the glass (both sides had 36 rebounds) and fought for every loose ball with determination.
Diez, from the foul line, put Spain ahead 61-57 with 1:10 left on the clock but Israeli point guard Tom Maayan sunk a jumper and then stole the ball and tied the scores with 24 seconds left to play.
Spain had the last possession but as the 24-second clock was ticking, Israel believed they had earned themselves an overtime before Fernandez hit the game-winner.
Israel called a time-out but the in-throw pass could not connect with an Israeli player's hands for a tip-in in the remaining fraction of a second.
Diez finished with 23 points, Fernandez with 22 points and each grabbed seven rebounds; for Israel, Egor Koulechov had 21 points and eight boards and Or Solomon collected a double-double of 12 points and 12 rebounds.