Mario Bermejo's last-gasp strike gave Celta Vigo a priceless three points as they came from behind to see off Primera Division relegation rivals Real Zaragoza 2-1.
Bermejo struck in the second minute of added time as the Galician club moved off the foot of the table - above tonight's opponents - and to within two points of safety.
The hosts had fallen behind to Cristian Sapunaru's header midway through the first half and although Alex Lopez levelled proceedings shortly afterwards, it looked like the teams would have to settle for a point until Bermejo struck from close range.
With six games remaining in the season, this was still a must-win clash for Abel Resino's men, who were three points adrift of Zaragoza before kick-off.
While Celta started brightly, with Lopez curling a free-kick from just outside the area over the crossbar, at the other end Javi Varas had to be at his best to fingertip away Adam Pinter's long range drive.
Lopez should have done better with his strike from six yards but was brilliantly denied by Zaragoza keeper Roberto, who used his feet.
It looked to be a crucial miss when Sapunaru gave the visitors a 25th-minute lead, heading into the top corner following Antonio Apono's free-kick from the left wing.
Spurred into action, Lopez missed the target from just outside the box before making amends for his earlier misses in the 36th minute.
The 25-year-old midfielder rose highest to head home from Augusto Fernandez's centre from the right.
Natxo Insa had the opportunity to put Celta ahead just after half-time but Sapunaru kept the scores level with a last-ditch tackle.
The Blanquillos were still a threat on the attack and Varas had to tip Portugal international Helder Postiga's effort round the post.
But the home side were starting to get on top in the closing stages, with Fabian Orellana twice missing the target from decent positions.
Just as it seemed they would have to settle for a point that would have kept them at the bottom of the table, Bermejo slotted past Roberto from Orellana's left-wing cross to give the spoils to the hosts.
Information from the Press Association was used in this report.