Real Madrid`s resurgent La Liga run skidded to a halt as they fell to a shock 1-2 defeat at home by struggling Girona on Sunday in which captain Sergio Ramos was sent off in added time, leaving them nine points adrift of leaders Barcelona.
Real looked on course for a sixth consecutive league win when Casemiro leaped highest to meet a Toni Kroos cross and head them in front midway through the first half.
But Girona, who had not won in the league since November, came out with a vengeance in the second half, leveling in the 65th minute with a Cristhian Stuani penalty after a handball by Ramos.
Spanish striker Cristian Portu gave Girona an unlikely lead 10 minutes later, nipping in front of Madrid`s lackluster defender Marcelo to nod in on the rebound after Thibaut Courtois could only parry a shot from visiting forward Anthony Lozano.
Madrid substitutes Gareth Bale and Vinicius Jr each squandered opportunities to level and things got worse when Ramos earned a second yellow card in stoppage time and was sent off for the 25th time in club football.
Real goalkeeper Courtois came close to salvaging an equaliser late on but headed wide, leaving Real third in the standings on 45 points, nine behind table-toppers Barcelona and seven back from second-placed Atletico Madrid.
Madrid had eased to a 7-3 aggregate win over Girona in the Copa del Rey last month, and with the Catalans sitting one point above the relegation zone and having lost their six previous games, a home win seemed highly likely.
Coach Santiago Solari made six changes from the team that beat Ajax Amsterdam 2-1 in a Champions League last-16 first leg, handing breakout forward Vinicius Jr a rest after 12 consecutive starts and also benching Bale.
But perhaps his biggest mistake was handing the out-of-form left-back Marcelo a first league start since January 6.
Girona attacked Marcelo`s right wing throughout the second half, with Portu enjoying particular freedom, thumping the near post moments before he headed in the winning goal.
Midfielder Aleix Garcia had blazed a golden chance to equalise over the bar early in the second but Girona finally were rewarded for their bold attacking approach when Ramos blocked a goal-bound shot with his hand and a penalty was given.
Girona`s confidence rocketed after equalising while Madrid lacked composure in their attempts to find a way back in the game.