Spain edged Bulgaria in a thriller at the OSTCHEM U20 European Championship Women in Sopron on Wednesday.
The Spaniards had led by as many as nine points in the fourth quarter but Radostina Slavova's lay-up with 42 seconds remaining tied the game for Bulgaria at 56-56.
Silvia Dominguez buried a three-pointer with 16 seconds to play to put Spain back in front.
The Bulgarians had a chance to pull level, but Ekaterina Dimitrova turned the ball over with four seconds left and Dominguez struck again with a jumper as time expired for a 61-56 Spanish win.
The result evened their record at 1-1 while Bulgaria are now 0-2 in the group.
Bulgaria's Jaklin Zlatanova led all scorers with 18 points.