Real Madrid threw away their lead and perhaps their hopes of catching Barcelona as Girona came from behind to pull off a shock 2-1 victory at the Santiago Bernabeu on Sunday.
Girona had not won in 13 matches and looked on course for a seventh straight defeat when Casemiro headed a dominant Madrid ahead in the first half.
But complacency set in, and Girona took full advantage as Cristhian Stuani scored a penalty and Portu nodded in at the back post, leaving the European champions scrapping even for a point before Sergio Ramos was sent off in the 90th minute.
They failed even to muster that, with defeat here a major act of self-harm for what was beginning to look like a serious resurgence in La Liga's title race.
Barcelona had beaten Real Valladolid by a single goal on Saturday but their stodgy display continued a period of uncertainty for the Catalans, while Madrid arrived here on the back of seven wins and a draw at the Camp Nou.
Barca still have to go to the Bernabeu later this month but that Clasico will be a lot less nervy now. Their cushion has been extended to nine points over Real, with Atletico jumping back above them into second, seven points off the top.
"It's a shame," Real coach Santiago Solari said. "We drop points and our rivals won. It is a pity because we were on a great run. Is the league over? Not at all," he said.
Madrid barely broke sweat in the first half, in control but playing within themselves as long spells of possession were only occasionally turned into a clear-cut chance.
It was no surprise in the 25th minute when Casemiro nodded in Kroos' cross after Bono elected to punch rather than catch the initial ball in.
Madrid slipped from comfortable to complacent and shortly after the hour they were punished. Stuani's header spilled out to Douglas Luiz, whose finish was blocked by the hand of Ramos. Stuani made no mistake with the penalty.
Girona almost scored again, Portu's shot rattling the outside of the post, and then they did. Casemiro missed a tackle in midfield and Lozano's shot was parried to Portu. Marcelo dangled a leg but failed to stop the header creeping inside the post.