Struggling Espanyol stunned Catalan derby rivals Barcelona 2-1 to condemn the Primera Liga leaders to their first defeat since the end of August.
Espanyol sat bottom of the table ahead of kick-off, but a five-minute second-half brace from former Barca player Ivan De la Pena proved too much for their hosts - who could only respond through Yaya Toure - at the Camp Nou.
The first half had been a typically robust affair between two local rivals and Seydou Keita was shown a straight red card after 38 minutes.
Five minutes after the interval Espanyol - who had not won since November - made their numerical advantage count as De la Pena headed past Victor Valdes.
The Barca goalkeeper then endured a horrible moment in the 55th minute as he dallied on the ball before scuffing his kick straight to De la Pena and the Espanyol hero duly chipped in his second of the match.
Toure set up a tense finish with a well-taken strike on 63 minutes, but Pep Guardiola's Barca - who last lost in the league against Numancia, 22 games ago, in the season's first round of fixtures - could not find an equaliser.
Real Madrid have, therefore, closed the gap at the top of the table to seven points after thumping Real Betis 6-1 at the Bernabeu.
All the goals came in the first half in the Spanish capital as Juande Ramos' side sent an ominous warning to Liverpool ahead of their UEFA Champions League last 16 meeting.
Gonzalo Higuain opened the scoring in the seventh minute, before Klaas Jan-Huntelaar (15 and 24) and Raul (36 and 42) both hit braces, while Real Betis raised hope with a solitary Ricardo Oliveira strike sandwiched in between on the half-hour-mark.
Real Madrid defender Sergio Ramos wrapped up the scoring on the stroke of half-time as his side strolled to their ninth successive league victory.
Sevilla will feel they have taken a giant step towards next season's Champions League after Jesus Navas struck with three minutes remaining to secure a 1-0 home win over rivals Atletico Madrid.
The third-placed Estadio Ramon Sanchez outfit now hold an eight-point advantage over Atletico and enjoy a better head-to-head record.
Villarreal have climbed to fourth after defeating Sporting Gijon 2-1 at El Madrigal.
The match started in explosive fashion as Mate Bilic put Sporting in front inside the first minute, but former Arsenal star Robert Pires responded 60 seconds later.
Joan Capdevila then headed the winner nine minutes before the break as Villarreal - who are readying themselves for a Champions League tie with Panathinaikos - secured the win.