Athletic Bilbao kept their slim hopes of qualifying for Europe alive by coming from a goal down to beat already-relegated Real Murcia 2-1.
The visitors fell behind after 17 minutes when Ivan Alonso opened the scoring, but they were level by half time when Fernando Llorente struck just after the half-hour mark.
With eight minutes to play Igor Gabilondo scored to take all three points and keep Athletic within four points of seventh place and an Intertoto cup spot.
The win also guarantees that the Basque side will not be joining Murcia in the Segunda Division next season, as they are now nine points clear of the relegation places with only two games left.
Still it was the relegated side who looked the better of the two teams as the game got under way.
Led by Alonso the hosts put Athletic under plenty of pressure during the first quarter of an hour, with only Basque keeper Armando Ribeiro keeping the visitors in the game.
However, Armando could only keep his side in it for so long, and he was finally beaten by Alonso 17 minutes in when the Uruguayan forward was first to react to a cross into the box from Enrique De Lucas.
Athletic thought they had levelled seven minutes later when Aritz Aduriz had the ball in the net, but the referee ruled the goal out after the forward appeared to have controlled the ball with his hand before shooting.
The visitors looked short of ideas soon after, but from nowhere they pulled themselves back into the game after 32 minutes when Llorente got on the end of a high ball into the box.
Murcia hit back straight away when Inigo Velez drew another save from Armando, then turned on themselves when Alonso fired the ball towards his own goal forcing keeper Fabian Carini to punch clear.
Coach Javier Clemente sent the hosts out to attack in the second half and his side had three good chances in the initial 15 minutes after the restart.
Alonso and Inigo both fired wide, but De Lucas came within a whisker of handing his side the lead when he fired a free-kick onto the crossbar.
Baiano was next to go close with 20 minutes remaining, just minutes after he came onto the pitch, but again Armando kept his side in it as Athletic seemed lifeless despite being the only side on the pitch with something to play for this season.
But just as it began to look like being a matter of time before Murcia struck the winner the Basques, out of nowhere again, stole the lead.
A free-kick from Francisco Yeste bounced around in the box before falling to Gabilondo to stroke home with no opposition from the Murcia defence.
It was a cruel blow to the hosts, who failed to raise themselves for the remaining eight minutes as Athletic ran the game out for the win.