After trailing for most of the game, Spain’s Tamara Abalde sank two jump shots to level at 50-50 with 01:18 on the clock, but their opponents scored twice from the charity stripe in the final minute to claim a narrow victory.
Jelena Milovanovic scored the first of those free-throws to take her to a game-high total of 17 points and eight rebounds, and she was ably assisted by Sonja Petrovic, who poured in eight points and pulled down 12 rebounds.
Serbia stormed out of the blocks and took a 7-0 lead in the first two minutes, ending the quarter 14-6 up.
A 7-0 burst for Spain in the second period stopped Serbia carrying the game away, and the score was 27-18 at the midway point.
In the third quarter Spain got to within touching distance of their opponents on several occasions, but Serbia kept them at bay, going into the final 10 minutes ahead by six at 38-32.
Jael Freixanet sunk a three-pointer with just under five minutes left to give Spain the lead for the first time in the game at 45-44.
But it was also to be the only time they led the game.
Serbia reclaimed the advantage soon after, and although Abalde gave the Spaniards hope, Milavanovic guided the Serbs home.