Villarreal piled the pressure on under-fire Real Madrid coach Zinedine Zidane as they snatched a 1-0 win over the struggling La Liga champions at the Bernabeu.
Real reached the quarter-finals of the Copa del Rey - where they will face Leganes - in midweek, but started the day 16 points behind rivals Barcelona in the league.
And that massive gap remains in tact after a sublime finish from Pablo Fornals finished off an 87th-minute counter-attack from the Yellow Submarine, who had goalkeeper Sergio Asenjo to thank for a number of vital saves.
The visitors threatened to break the deadlock after 11 minutes when Samu Castillejo tried to find Carlos Bacca with a precise pass, only for Raphael Varane to read the danger and produce a vital interception.
That prompted a prolonged spell of pressure from Real, who thought they had opened the scoring when Cristiano Ronaldo headed a Toni Kroos corner to Gareth Bale to nod home from close range, only for the Welshman to be correctly flagged for offside.
Marcelo's thunderous left-footed drive from 30 yards then drew a brilliant save from Asenjo, who was soon called into action again to tip a swerving free-kick from Ronaldo on to the crossbar.
Villarreal still looked dangerous on their rare forays into the opposition half and Nacho did well to deny Bacca a clean shot on target with a well-timed block.
But Real were quick to respond in an entertaining contest and Luka Modric set Ronaldo clear on the right-hand side of the area, only for the Portuguese star to lift the ball over the onrushing Asenjo and wide of the far post.
Ronaldo then saw his close-range shot brilliantly saved by Asenjo with the last action of the first half, with Mario Gaspar perhaps fortunate not to concede a penalty for clipping Ronaldo as he raced onto Isco's low cross.
Villarreal started the second period brightly and half-time substitute Denis Cheryshev fired wide on 47 minutes after taking advantage of some hesitant defending, before Kroos volleyed straight at Asenjo at the other end.
Modric also forced Asenjo into a routine save before the former Tottenham player blazed over the bar from 15 yards with 10 minutes remaining.
And the home side were made to pay for such profligacy when Villarreal grabbed the winner on the counter-attack after clearing a poor Real corner.
Cheryshev broke clear down the left and found Enes Unal in the centre of the penalty area, and although Unal's shot was blocked by the onrushing Keylor Navas, it landed to Fornals to chip a first-time shot over the despairing goalkeeper.