Real Madrid took advantage of a 0-0 draw between Atletico Madrid and Barcelona with an unconvincing 1-0 win at Espanyol which closed the gap on the leaders to three points at the halfway stage of the season.
Pepe's 55th-minute header was enough to secure victory at Espanyol's Cornella-El Prat stadium and third-placed Real have 47 points from 19 matches, three behind Atletico and Barca, who top the table on goal difference.
Fourth-placed Athletic Bilbao pulled four points clear of Basque rivals Real Sociedad in fifth following a 6-1 drubbing of promoted Almeria at their new San Mames stadium.
Juventus stay top
Meanwhile, Serie A leaders Juventus stayed eight points clear after coming from behind to win 4-1 at Cagliari, a club record 11th successive league victory.
Fernando Llorente scored twice and Claudio Marchisio and Stephan Lichtsteiner also found the net for the champions who have dropped only five points in their first 19 games.
Second-placed AS Roma beat Genoa 4-0 and Napoli, in third, won 3-0 at Verona as the top three remained unchanged.
Teenager Domenico Berardo scored four goals to help promoted Sassuolo recover from two goals down and beat AC Milan 4-3, writing another unhappy chapter in Milan's sorry season.
In France, Paris St Germain opened a five-point gap at top of Ligue 1 with a 2-1 comeback win at AC Ajaccio on after second-placed Monaco could only manage a 1-1 draw at Montpellier.
The French champions, now on 47 points from 20 games, prevailed thanks to goals by Ezequiel Lavezzi and Blaise Matuidi, who were both set up by Zlatan Ibrahimovic after Eduardo's early opener for Ajaccio.