Santi Aldama had 19 points and 12 rebounds and Spain defeated Greece 84-77 on Tuesday to earn its first victory of the Paris Olympics and remain in contention to advance to the knockout round.
Sergio Llull finished with 13 points. Spain improved to 1-1 in Group A with one group-stage game left to play against Canada.
Giannis Antetokounmpo had 27 points and 11 rebounds for Greece.
After losing their opening games on Saturday, Greece and Spain both came out essentially playing for their tournament lives, with the loser facing a must-win scenario on Friday — and likely lots of help — to have any chance of advancing.
That team is now Greece, which will meet Australia in its final chance to earn a victory before the field is trimmed to eight teams.
Greece cut what had been a 14-point halftime deficit to a point early in the fourth quarter.
It then tied it at 71 on an emphatic, driving left-handed dunk by Antetokounmpo over Aldama.
But Spain steadied over the next few minutes, scoring the next eight points.
Greece pulled back to within 80-77 with 59 seconds left, but Antetokounmpo had a 3-pointer from the top of the key bounce off the rim.
Antetokounmpo set the tone for his team early, getting to the rim on multiple occasions, including a putback dunk over Usman Garuba.
Aldama did the same for Spain, leading all scorers out of the gate with 10 first-quarter points. He also got support from his teammates during a 13-3 run to end the second quarter that put Spain in front 49-35 at halftime.
Spain has a big health concern going forward after Rudy Fernandez left late in the fourth quarter after a collision under the basket and was helped by trainers to the locker room.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)