Sevilla missed the chance to break into La Liga's top four as they slipped to a 3-1 defeat at Real Sociedad.
Eduardo Berizzo's side would have leapfrogged Real Madrid with victory -- albeit having played two games more -- but saw their winless league run extended to three matches.
Wissam Ben Yedder fired Sevilla level just before half-time after Inigo Martinez had headed Sociedad into the lead.
But Sociedad regained the lead through Igor Zubeldia in the 76th minute and Carlos Vela made sure of their first league win in five matches by adding a third in the closing stages in his final game before moving to LAFC.
Guido Pizarro, Pablo Sarabia and Ever Banega had all gone close for Sevilla in the second half and Ben Yedder had a low shot saved in the bottom corner in the first period.
Getafe climbed into the top half with a 2-0 home win against bottom club Las Palmas.
Former Cardiff defender Juan Cala headed Getafe into an early lead and Amath Ndiaye's low finish put the home side 2-0 up in the 15th minute.
Alberto Aquilani went closest for Las Palmas, forcing a fine low save from Getafe goalkeeper Vicente Guaita in the second half, while both sides created several other goalscoring chances.
Getafe secured their second win in four games, while Las Palmas slumped to a seventh defeat on the road and remain below second-bottom Malaga on goal difference.