Girona came from a goal down to beat ten-man Real Madrid 2-1 in Sunday’s La Liga fixture at the Santiago Bernabeu.
The defeat leaves Real Madrid in third spot, nine points adrift of leaders Barcelona.
Santiago Solari’s side came into the game after huge results against Barcelona, Atletico Madrid, and Ajax but were undone by relegation-threatened visitors in the second half after they took the lead after 25 minutes.
Casemiro shot Real Madrid into the lead midway through the first half but two second-half goals from Cristhian Stuani in the 65th minute and another from Portu ten minutes later ended Girona’s 10-match winless streak in Spain’s top flight.
Real pushed forward during the closing stages with Gareth Bale been denied by a block from Bono by the penalty spot, but things went from bad to worse for the home side when Ramos was dismissed for a second yellow card.
Thibaut Courtois went up for a corner in the last minute of added-on time, but the goalkeeper headed just wide of the target as Girona held on to register a vital three points in their efforts to beat the drop.
Girona are now in 15th spot and sit four points clear of the relegation zone.