Real Sociedad took a huge step toward qualifying for the UEFA Champions League next season as they came from behind to beat Valencia 4-2 at the Estadio Anoeta.
Roberto Soldado had headed the visitors into an early lead, but Inigo Martinez leveled with a sweet volleyed finish 11 minutes before the break.
Chori Castro then finished off a wonderful counterattack to give Sociedad the lead on 73 minutes and Imanol Agirretxe looked to have sealed the points four minutes from time.
Jonas momentarily put the outcome back in doubt when he halved the deficit, but Agirretxe rounded off the scoring with a beautiful chip over Diego Alves in the last seconds of the game.
The win moves Sociedad five points clear of both Valencia and Malaga in fourth place with just five games remaining.
“We are happy with this result, the manner with which we played and most importantly the result,” Sociedad coach Philippe Montanier told a press conference afterwards. “It was a great game for everyone involved with Real Sociedad. The atmosphere created by the fans was great and the players fed off that.”
However, it had been Valencia who got off to the best possible start with a wonderfully worked goal on 25 minutes as Soldado showed great movement to get on the end of Aly Cissokho’s cross and flick his header inside the far post.
Soldado was up in arms moments later, though, when referee David Fernandez Borbalan failed to see a clear handball by Claudio Bravo outside the area, which took the sting out of Soldado’s attempted lob and allowed Mikel Gonzalez to clear.
Having been given a lifeline, Sociedad were soon level as a well-worked corner on the left created space for Castro to cross and he picked out Martinez at the back post to volley home in style.
Sociedad went in front 17 minutes from time thanks to a stunning counterattack from a Valencia corner as Castro and Agirretxe exchanged passes on two occasions, before the former slotted neatly past Diego Alves.
The Brazilian goalkeeper then kept his side in it with fine saves from Carlos Vela and Agirretxe.
However, he was beaten again four minutes from the end when Agirretxe turned home Xabi Prieto’s cross.
Jonas pulled one back with a header from close range as the game entered stoppage-time after Bravo could only parry Pablo Piatti’s effort, but the home fans’ nerves were eased moments later as Agirretxe produced another stunning finish to move Montanier’s men to within touching distance of a first UEFA Champions League campaign in 10 years.
Elsewhere, Malaga moved level with Valencia in fifth with a routine 2-1 win over Getafe.
Roque Santa Cruz and Weligton got the goals for the hosts just before and after halftime, and despite Juan Valera’s reply 20 minutes from time, Getafe’s own European hopes are dwindling after a third consecutive defeat.
At the bottom, Granada gave their hopes of survival a big boost with their first win in 10 games at RCD Espanyol.
Nolito scored the only goal of the game with a stunning free-kick seven minutes before halftime, which moved Lucas Alcaraz’s men out of the relegation zone and up to 16th.
In the clash between two sides stuck in midtable mediocrity, Real Valladolid and Sevilla shared the points in a 1-1 draw.
Javi Guerra put Valladolid ahead four minutes before halftime, but Alvaro Negredo leveled from the penalty spot just after the hour mark when Marc Valiente was harshly adjudged to have deliberately handled inside his own penalty area.