An unconvincing Real Madrid moved to within three points of the top two in La Liga with a 1-0 win over Espanyol on Sunday.
After seeing title rivals Barcelona and Atletico Madrid draw 0-0 at the Vicente Calderon on Saturday, Real knew a victory would put them back in contention at the halfway stage of the season.
Real's performance, though, was far from their fluent best, but Carlo Ancelotti's men made it seven wins from their last eight league games thanks to Pepe's towering header early in the second half.
The Portugal international rose to meet Luka Modric's right-wing cross and headed past Kiko Casilla for his third goal of the season.
Rayo Vallecano's 1-0 victory over city rivals Getafe saw them move to within two points of safety at the bottom of the table, while extending the gap to Real Betis in last place.
Alberto Bueno grabbed the only goal of the game for Rayo, his sixth in the league this season, to help his side pick up a first league win since early November.
That result was bad news for Betis and things soon got worse as they fell to a 2-1 defeat to Osasuna, meaning new coach Juan Carlos Garrido is still waiting for his first win.
Osasuna took the lead early through midfielder Roberto Torres and, after Nono had been sent off for Betis, the visitors doubled their lead thanks to Jordi Figueras' 57th-minute penalty.
Both sides were down to 10 men on the hour when Andres Fernandez received a straight red. And although Jorge Molina pulled a goal back, Betis' winless streak in the league was extended to 12 games.
Levante ended a run of two consecutive defeats with a 1-0 win over Malaga, a result that sees Joaquin Caparros' side climb above their opponents and into tenth place.
David Barral's 19th-minute header from Andreas Ivanschitz's cross was enough for Levante to seal the three points, although Roque Santa Cruz and Sergio Sanchez both missed chances for Malaga in the latter stages.
|Strootman: Totti could play for another five years|
|Saul: United target Griezmann important but no one is above Atletico|
|Strootman always knew he would extend Roma contract|
|Iniesta refuses to commit to Barcelona|
|Higuain: I have affection for Real Madrid rival Ramos|
|AFC Champions League Review: Al Ain hit six against Esteghlal as Al-Ahli defeat Al-Ahli|
|Eintracht Braunschweig 0 Wolfsburg 1 (0-2 agg): Vieirinha seals Bundesliga survival|
|Buffon deserves Ballon d´Or for current form, not past achievements - Chiellini|
|I hope he calls it a day - Adams urges Wenger not to spoil Arsenal reign|
|Allegri not worried by Juve final record|
|Another promotion campaign daunting for defeated Stam|
|The pundits wrote us off - Wagner hails Huddersfield´s fairytale promotion to Premier League|
|The night Valverde embarrassed Barcelona|
|Managing egos, sorting the defence and playing the Barca way - Valverde´s Camp Nou challenges|
|Valverde named new Barcelona boss|
|Huddersfield Town 0 Reading 0 (aet, 4-3 pens): Ward the hero as Wagner´s men go up|
|Chiellini: Juve better than 2015 Champions League final loss|
|Strootman signs new five-year Roma deal|
|Pellegrino leaves Alaves after Copa final defeat|
|Bye for now - Hart departs Torino after loan spell|
|BREAKING NEWS: Ter Stegen agrees Barcelona renewal until 2022|
|Bartra feared for his career after Dortmund bus attack|
|Dortmund confirm knee ligament damage for Reus|
|Calm down - Mendy cools talk of City move with Paris video|
|AC Milan losing patience over Donnarumma|
|Terry eyes Wembley return as a manager|
|Coman pondered Bayern exit|
|Four fans die after stampede ahead of Honduran final|
|Mijatovic magic, Zidane heartache - Real Madrid and Juventus´ 1998 Champions League final|
|Moses is not a cheat - Conte|
|MLS Review: Atlanta too good for New York City, Dallas draw|
|Totti could´ve played for any big club – Ramos hails Roma great|
|Wenger: FA Cup win my presentation for new deal|
|I´m crazy about returning to Spain – Nolito eyes City exit|
|Roma defender Emerson suffers anterior cruciate ligament injury|
|Zenit sack Lucescu after missing out on Champions League|
|This was probably my last game for Benfica - Ederson hints at Man City move|
|Empoli relegated as Crotone beat Lazio to secure Serie A survival|
|Lorient 0 Troyes 0 (1-2 agg): Goalless draw sees visitors promoted to Ligue 1|
|Dzeko´s 29 goals claim Serie A Capocannoniere|
|Inter 5 Udinese 2: Perisic stars in crushing victory|
|Ausilio confirms Manchester United interest in Perisic|
|Totti: I´m not ready to say it´s over|
|Totti is not normal - De Rossi emotional after Roma icon´s farewell|
|Twenty-five seasons, 307 goals, one incredible legacy – the numbers behind Totti´s remarkable career|
|Sampdoria 2 Napoli 4: Comprehensive win not enough to snatch second place|
|Roma 3 Genoa 2: Perotti seals Champions League berth in dream farewell for Totti|
|Leave him alone! - Montella shrugs off Donnarumma error|
|I didn´t want to leave Real Madrid - Ronaldo|
|The offside rule is crazy - Cahill hits out at Sanchez FA Cup goal|
|I think Rooney wants to leave Manchester United, says Robson|
|Cagliari 2 AC Milan 1: Pisacane late show seals fitting Stadio Sant´Elia farewell|
|Inter announce Palacio departure|
|Courtois ready to sign new Chelsea contract|
|Everyone wrote me off - Critics inspired Mertesacker before Arsenal triumph|
|Emery never feared the sack at PSG|
|Barcelona future not in my hands – Paco Alcacer|
|Varane wants to see Mbappe alongside history-maker Ronaldo|
|Iniesta: I needed Busquets´ help to lift the Copa del Rey trophy!|
|Man United capable of anything - Lingard eyes glory next season|
|Freiburg´s Grifo signs Borussia Monchengladbach deal|
|Verratti expects to be at PSG next season amid Barcelona rumours|
|Coquelin: FA Cup win was for Wenger and we want him to stay|
|Ibrahimovic wanted by ´many clubs´, but he´ll stay in Europe - Raiola|
|Matuidi unsure about PSG future amid Man United links|
|Al-Khelaifi certain Emery will stay at PSG|
|MLS Review: Galaxy win Clasico, Sporting KC beaten|
|He will be at the Wanda Metropolitano – Atletico hint at Griezmann stay|
|Mexico 1 Croatia 2: Hernandez breaks record in surprise loss|
|Mexico 1 Croatia 2: Hernandez breaks record in surprise loss|
|Luis Enrique hails ´extraterrestrial´ Messi|
|Every player wants to play more – Fabregas cagey on Chelsea future after final omission|
|Tuchel hopes to continue as Borussia Dortmund boss|
|Kompany adamant Stones ´has everything´|
|People talk too much about China - Costa would only leave Chelsea for Atletico|
|Conte clear-headed for close season after Chelsea´s Wembley woe|