Lowly Girona stunned Real Madrid when they came from a goal down to win 2-1 at the Bernabeu on Sunday in a game that saw Sergio Ramos suspended for two bookings.
But there is relief for Madrid, as Ramos will be suspended for next week's match in Levante rather than the two upcoming Clasico games.
Casemiro gave Madrid a half-time lead, but Cristhian Stuani level from the penalty spot and Cristian Portu led a shock winner for the side that started the day in 17th place.
Girona made a positive start and put together a nice move when Portu and Alex Granell were tied but the last ball in the Madrid area just failed to find Stuani.
Madrid flickered Toni Kroos serving a warning sign when his dangerous free kick was cleared by Douglas Luiz.
With just over a quarter of a mile, Kroos found Lucas Vazquez, whose shot took a good stop from Yassine Bounou, but Girona responded and Stuani pulled a step od saved from Thibaut Courtois.
And Kroos was again involved when Madrid took the lead after 25 minutes, the cross at home heavily crossed home by Casemiro.
Lucas and Alvaro Odriozola were combined to look for Karim Benzema, who failed to reach a low cross, before Alex Granell crushed an attempt next to Girona.
Benzema was close to doubling Madrid's lead as half-time approached, Bounou offered his rising shot, and he should have done so early in the second half to just run Marco Asensio's cross wide when he was unmarked inside the box of six yards.
Madrid coach Santiago Solari made his first change just before the hour, which took Vinicius Jr. on for Lucas just before the hour, but shortly thereafter, his grateful thanks for a bad Girona miss.
Visitors certainly looked to equalize when Courtois rescued from Anthony Lozano but Aleix Garcia, from
But they were level after 64 minutes when Ramos handled a Garcia shot and Stuani beat Courtois from the penalty spot, Ramos entered the book .
Vinicius Jr. shot over as Madrid loo ked to regain his advantage, but it almost got worse for the home team after 71 minutes.
And they got worse with a quarter hour left when the visitors went ahead, Courtois paired Lozano shots and Portu diving to lead the rebound past him.
Vinicius Jr. saw a curler go next to the top post as time began running out for Madrid, replacement Gareth Bale then failed by Bounou.
In the closing hours, a high support from Ramos deep inside the Girona penalty area resulted in a second yellow and his 25th red card to Madrid and it was still time for goalkeeper Courtois, for a corner to head narrowly wide.