The world number two and European champions have rarely looked at their best in this tournament, and struggled mightily against Russia's imposing defence in the first half.
But in a reverse of their meeting in the group stages, when Russia came from 18 points down to win 77-74, Spain came alive after the break to make what was once a 13-point deficit into victory.
A Spanish team dominated by members of 'Los Chicos de Oro', the golden generation that emerged when they won the 1999 World Junior Championship, came through when it mattered to give themselves another shot at a first-ever Olympic gold on Sunday.
They will at least match the silver medal they won in Beijing.
Pau Gasol led Spain with 16 points while Jose Calderon added 14 and Marc Gasol and Rudy Fernandez had 11 each.
Sasha Kaun had 14 points and Anton Ponkrashov and Andrei Kirilenko 10 each for Russia.