Gerard Moreno's stoppage-time strike ensured that Espanyol earned a shock win against Real Madrid courtesy of a 1-0 victory at the RCDE Stadium in La Liga this evening.
The defeat for Zinedine Zidane's charges is now their fifth of the season and brings an end to a four-game winning run in the Spanish top flight.
Victory for Quique Flores and his men in Catalonia has in turn ended an 11-game losing streak against Real across all competitions.
Keeping an eye on a crucial Champions League clash with Paris Saint-Germain, Zidane opted to start with an experimental starting XI, but Madrid might have been ahead inside the opening exchanges had Gareth Bale been able to head Achraf Hakimi's cross either side of Diego Lopez.
Madrid held much of the ball early on and they appeared dangerous again when Mateo Kovacic fed Isco on the overlap, who saw his chipped effort into the danger zone tipped over the crossbar by a leaping Lopez.
For all of their dominance on the ball, Madrid failed to threaten too often for the remainder of the first half. Instead Espanyol almost went in front when Moreno capitalised on a poor pass from Raphael Varane, only to see Keylor Navas make a vital save with his legs.
Perhaps the greatest controversy of the opening 45 minutes came soon after, when an effort from outside of the box deflected kindly into the path of Moreno, who then turned unmarked inside the box to send a shot beyond Navas. The frontman was instantly denied by the linesman's flag, although replays suggested that Moreno might just have been kept onside by Real youngster Marcos Llorente.
Bale had a quiet first half but he was left frustrated when he drilled an effort towards goal at the back post, only to see it cannon into the body of Victor Sanchez, who appeared to block the ball with his arm when sliding across the deck.
Espanyol started the second period brightly and they were unlucky when Sergio Garcia broke free before seeing his shot from an acute angle kept out by Navas despite the keeper looking less than assured at his near post.
Again Real struggled in the final third and eventually opted to introduce Karim Benzema, but the Frenchman could do very little to impact a defensively adroit Espanyol side, who defended in numbers to keep Madrid quiet.
The hosts might have grabbed a winner just over 10 minutes from time too, but Navas responded well to meet Moreno's pinpoint header with a smart diving save.
The crucial moment arrived with what was essentially one of the final kicks of the game, however, as Moreno broke free inside the box and found himself unmarked after Real had thrown a number of men forward in search of a winner.
Having come up against a defiant Navas for most of the evening, Moreno made the final chance of the game count as he then volleyed into the ground and beyond the Madrid stopper to seal a memorable win for Espanyol in Catalonia.
ESPANYOL (4-4-2): Lopez; Navarro, Lopez, Duarte, Caricol; Arder, V. Sanchez (Granero 68'), C. Sanchez, Piatti (Baptistao 79'); Garcia, Moreno
REAL MADRID (4-2-3-1): Navas; Achraf, Ramos, Varane, Nacho; Kovacic (Mayoral 89'), Llorente; Isco (Benzema 68'), Vazquez, Asensio; Bale (Ceballos 81')