Spain thrashed Russia 76-39 to clinch top spot in Group E as both teams made it through to the semi-finals of the UMCOR U18 European Championship for Women.
The defending champions went into the game knowing that a defeat would knock them out of medal contention.
Tamara Abalde had 11 points for Spain in her return from injury.
But an inspired Alba Torrens led them to a convincing win with a game-high 23 points while Tamara Abalde, who returned to play on Thursday after recovering from an ankle injury, added 11.
The Spanish will take on Poland in the last four while Russia will meet host nation Serbia.
Spain scored the first nine points of the game and took an 18-8 lead going into the second quarter.
The defending champions kept up the intensity and went into the break with a 34-20 advantage.
Spain limited Russia to just four points over the next eight minutes while they scored 24 to take a 58-24 lead into the last period and they cruised home, though Beatriz Rey and Marta Perez came off the court with ankle and knee knocks.
"We knew that we had to win this game," said Alba Torrens.
"We came out very focused and we took an early lead in the opening half and we were able to kill them off after the break.
"I think the key has been that we played at a high-rhythm and they weren't able to cope with that.
"Abalde's return has been a huge motivation for the team.
"Now we hope to recover Beatriz and Marta for the semis."
Spain outrebounded Russia 46-33.
Russia had a terrible shooting night, as they were 12 of 50 (24%) from the floor while the Spanish finished 27 of 69 (39%).