Real Zaragoza sank back into the Primera Division relegation zone after seeing Athletic Bilbao snatch a 2-1 victory from the jaws of defeat at La Romareda.
Helder Postiga headed Zaragoza into the lead after 14 minutes but an equaliser from Fernando Llorente on 80 minutes and then a stoppage-time winner from Ibai Gomez condemned them to defeat.
Zaragoza now occupy the final relegation spot and are one point behind Deportivo La Coruna, their main rivals to avoid the drop, who beat Espanyol earlier on Sunday.
Athletic, needing just a point to secure survival, are now guaranteed another year in the Primera Division, conserving their record of having never been relegated in their history.
Manolo Jimenez's Zaragoza side produced a solid performance for most of the game but lost concentration towards the end.
They certainly made the stronger start of the two teams with Postiga prominent.
Athletic goalkeeper Gorka Iraizoz was surprised by a header from the Portugal international which came off Jon Aurtenetxe, but the goalkeeper still managed to get across his line in time to gather.
However, there was little he could do about the opening goal, a leaping header from Postiga that went far into the top corner after a good cross from Paco Montanes.
Athletic were not at their best in the first half with their only real chance falling to Oscar De Marcos, who skewed well wide after Markel Susaeta had shown great skill to hold onto the ball under pressure.
Athletic did have the ball in the net right on the stroke of half-time, but De Marcos was ruled to be offside, and his headed goal was chalked off.
Iraizoz made a great save to deny Postiga from close range shortly after the re-start, while Athletic came close to scoring from a free-kick by Gomez which went just a few inches over the bar.
Zaragoza also threatened from a free-kick, as Iraizoz tipped a cross from Rochina onto the bar, before it was cleared by an Athletic defender.
The visitors equalised with 10 minutes remaining. Llorente first failed to beat Roberto from close range and then the ball fell to De Marcos, whose shot ricocheted off several defenders before falling at the feet of Llorente again, and this time the striker managed to roll the ball over the line.
Zaragoza desperately went searching for a winner and Adam Pinter had a chance near the end but glanced a header well wide of Iraizoz's goal, while the hosts also made half-hearted appeals for a penalty for handball by Xabier Castillo in injury time.
However, things got even worse for Jimenez's side when Ibai backheeled the ball into the net from inside the six-yard box after a cutback from De Marcos, leaving Zaragoza now depending on other teams to avoid the drop.