Zinedine Zidane suffered his first defeat since taking charge of Real Madrid as Antoine Griezmann's solitary strike kept Atletico Madrid's faint La Liga title hopes alive with a 1-0 win at the Santiago Bernabeu.
Griezmann finished off a lovely team move eight minutes into the second half as Atletico became the first visiting team ever to win at the Bernabeu three seasons in a row.
Diego Simeone's men move to within five points of leaders Barcelona while Real's chances of landing just a second title in eight years now look completely gone as they now trail Atletico by four points in third.
Barca can restore their eight-point lead at the top when they face Sevilla on Sunday.
"Once again the fans of Atletico Madrid can feel immensely proud of their players," said Simeone.
The final whistle was greeted by howls of discontent from the Real fans with chants for president Florentino Perez to resign.
"The league is over," said Zidane.
"You can't be happy with a defeat, with what happened and how we played."
An error-strewn first half was played at a pace that suggested both sides had already given up on their title hopes.
The first shot on target didn't arrive until the half-hour mark when Cristiano Ronaldo's free-kick was beaten out by Jan Oblak.
The rebound eventually found its way to Karim Benzema just inside the area, but the Frenchman pulled his shot past Oblak's far post.
Atletico were quite content to frustrate the hosts with 10 men behind the ball for long spells, but the visitors ended the half the stronger and were unfortunate not to be in front when Keylor Navas produced a brilliant save to tip Griezmann's drive from 25 yards over.
Navas also had to be aware moments later to prevent Koke's drive sneaking in at his near post.
Real were dealt a blow at the break as Benzema had to be replaced by 18-year-old Borja Mayoral -- who starred as Los Blancos reached the quarter-finals of the youth Champions League in midweek with a 3-1 win over Manchester City -- at half-time.
However, the hosts had a great chance to break the deadlock just three minutes after the restart when Ronaldo dragged his shot wide with just Oblak to beat from Luka Modric's through ball.
That miss proved costly five minutes later as Atletico produced the move of the match to snatch all three points.
Griezmann played in Filipe Luis in acres of space on the left and the Brazilian full-back showed great awareness to return the ball back into the path of the French international to fire low past Navas for his 20th goal of the season.
Atletico had the chance to kill the game off 24 minutes from time when they cut through Real's brittle defence once more, but Navas rushed from his goal to block Saul Niguez's attempted chip.
At the other end, Ronaldo should have leveled moments later when he headed straight at Oblak from Dani Carvajal's inch-perfect cross.
Real claimed in vain for a penalty when Danilo tumbled under Gabi's unwise challenge inside the area 15 minutes from time, but referee Clos Gomez was unmoved.
Zidane threw on wingers Lucas Vazquez and Jese Rodriguez in the search for an equaliser, but having sacrificed Isco and James Rodriguez, Real lacked the creativity to break down Atletico's brilliant defense as they held out for a 25th clean sheet of the season.