La Liga champions Barcelona, fresh from their Champions League exit at the hands of Liverpool, beat Getafe as the minnows dropped out of the top four.
Arturo Vidal put the double-chasing hosts ahead from close range.
Jorge Molina hit the woodwork for Getafe moments before Djene Dakonam’s own goal under pressure from Lionel Messi sealed the game.
Getafe now need to better Valencia’s result on the final day to claim a Champions League place.
Barcelona lost 4-0 at Anfield on Tuesday to go out of the semi-final 4-3 on aggregate. They play Valencia in the Copa del Rey final on Saturday, 25 May.
Elsewhere, third-placed Real Madrid lost 3-1 at Real Sociedad.
Brahim Diaz had given Madrid the lead with his first goal for the club but Mikel Merino levelled for the hosts.
Jesus Vallejo was then sent off for handball, with Willian Jose missing the resulting penalty. But the Basque side won thanks to goals from Joseba Zaldua and 17-year-old Ander Barrenetxea.
Madrid were well beaten with Mikel Oyarzabal and Adnan Januzaj hitting the post for Real Sociedad.