Deportivo La Coruna failed to make certain of their LaLiga status after being held to a 2-2 draw at relegated Osasuna.
A victory at El Sadar would have guaranteed safety, but a late own goal from Juanfran gave the home side a point and left Deportivo eight points clear of 18th-placed Sporting Gijon, who have three games remaining.
Osasuna took the lead after just four minutes when the visitors failed to clear a corner and Jhon Mondragon smashed a half-volley into the net, but Deportivo equalised on 18 minutes when Guilherme dos Santos was left unmarked to score with a diving header at the back post.
Dos Santos scored his second of the game from close range midway through the second half, only for Juanfran - who hit the bar in the first half - to put through his own net 12 minutes from time.
Alaves fought back from a goal down to defeat Real Betis 4-1.
Neither team had much to play for, with Alaves firmly in mid-table and Betis safe, and it was the hosts who took the lead in the 12th minute through Ruben Pardo.
But three goals in 10 minutes early in the second half turned the match on its head.
First Nenad Krsticic equalised three minutes after the break, then Ruben Sobrino put Alaves ahead before Christian Santos netted their third.
That looked to be that but Aleksandar Katai added a fourth with the final kick of the match.
It is as you were at the bottom of the table after Leganes were beaten 2-0 by Eibar.
Victory for the Pepineros would have taken them nine points clear of 18th-placed Sporting Gijon with three games left, but two goals in five minutes for Eibar settled the game.
First a Kike header in the 62nd minute broke the deadlock and then Sergi Enrich found the bottom corner.