Real Zaragoza ensured they will play Primera Division football next season after a 2-0 win over Getafe in a game marred by four red cards.
The visitors were handed the initiative midway through the first-half when Pablo Sarabia was stupidly sent-off for applauding referee Teixeira Vitienes' decision to book him and Getafe were reduced to nine men after the break when Miguel Torres was shown a second yellow card for handling inside the area.
Midfielder Apono coolly slotted away the resultant penalty but Zaragoza were reduced to 10 men when substitute Tomislav Dujmovic was shown a straight red card with seven minutes remaining.
However, after Miku became the fourth player to be given his marching orders, Helder Postiga sealed the points with a stunning strike into the top corner in stoppage time.
Manolo Jimenez's men seemed dead and buried two months ago, but a run of seven wins in 10 games coming into this encounter meant they knew one more win would be enough to stay up and they were helped greatly by the indiscipline of the hosts.
Zaragoza had controlled matters without ever seriously threatening before Sarabia was rightly booked for cynically stopping Angel Lafita from breaking clear and then instantly received a second yellow for taking his protestations too far.
Goalkeeper Miguel Angel Moya ensured that Getafe did at least get to half-time on level terms as he twice saved from Apono while Pablo Alvarez also fired wastefully wide.
The Aragonese side were in front in the 58th minute as Torres received his second yellow card for handball in the area and Apono dispatched the spot-kick into Moya's bottom right-hand corner.
However, Dujmovic then saw red for a wild challenge on Getafe midfielder Abdel Barrada in a dangerous position.
And Dani Guiza wasted a glorious opportunity to level proceedings but he skied Barrada's free-kick on the edge of the area over the bar from point-blank range.
Miku was also shown red moments later for a reckless challenge on Alvarez and Postiga rounded off an evening to remember for the visitors when he collected the ball outside the area and smashed an unstoppable drive high past Moya in the second minute of injury time.