Real Sociedad came from a goal down to register a crucial 2-1 victory at Sevilla as they reclaimed fourth spot in the Primera Division in the race for the final Champions League spot.
Ivan Rakitic put Sevilla ahead in the 10th minute but he turned from hero to villain seven minutes later with a headed own goal.
Imanol Agirretxe then scored what turned out to be a winner with Sevilla then having unused substitute Jose Antonio Reyes given a straight red card and sent from the bench.
Victory saw Sociedad move back into the fourth Champions League spot ahead of Valencia.
There was a lively start to the game, Gary Medel firing a fierce shot over for the hosts in the first minute before Antoine Griezmann squandered a great chance, the Sociedad striker firing wide after being played through with the goalkeeper just a bystander.
Antonio Beto had to be smart off his line to smother at Griezmann's feet but, despite all the visitors' pressing, it was Sevilla who took the lead with a well-rehearsed set piece.
The hosts played a short corner which found Geoffrey Kondogbia who played a low pass to Ivan Rakitic who calmly slotted the ball home.
Imanol Agirretxe was inches from Carlos Vela's sweet ball in front of goal as the visitors looked to hit back and they were soon level as Rakitic went from hero to zero.
Bergara Markel swung in a free-kick from the left which Rakitic rose to meet but he succeeded only in flicking it back over his own goalkeeper who was stranded.
The match was then turned on its head as Sociedad took a 2-1 lead.
Carlos Martinez sent an inswinging cross into the area with Agirretxe getting across a statuesque defence to volley the ball home.
Sevilla responded with Rakitic getting between two defenders and unleashing a fierce shot which Claudio Bravo punched away for a corner.
Alvaro Negredo's powerful header had the keeper down sharply to his left before Beto was called upon to parry Agirretxe's fierce shot.
Bravo then made a left-handed save from Medel's snap-shot, Griezmann's free-kick was deflected narrowly wide with Beto totally wrong-footed and Negredo fired wide after powering past the Sociedad defence as both sides continued to attack.
Negredo put a header inches away from a team-mate in front of goal before the same player nodded over.
However, there was a moment of controversy just before the hour mark.
The assistant wrongly flagged for offside and such was the vociferous nature of substitute Reyes' complaints, he was given a straight red card.
Vela then missed a golden chance, Beto saving with his legs after the Sociedad player had got beyond the defence.
Papa Baba Diawara headed Rakitic's corner wide as Sevilla continued to attack but could not find a way through.