Last updated on .From the section European Football

Cristhian Stuani played for Middlesbrough for two years before joining Girona in 2017

Real Madrid missed the chance to go second in La Liga as Girona came from behind to record a surprise away win.

Casemiro powerfully headed in from Toni Kroos' deep cross from the right wing to give the hosts a first-half lead.

Cristhian Stuani's penalty made it 1-1 after Sergio Ramos' handball and Girona's Portu then hit the crossbar.

Portu netted the winner with a diving header after Anthony Lozano's shot had been parried, before Ramos was sent off in injury time for two yellow cards.

The defender had been booked when he conceded the penalty, and received a second caution when he attempted an overhead kick but caught Girona's Pedro Alcala.

The red card was the 19th of Ramos' career in La Liga, more than any other player in the Spanish top flight.

It was another controversial moment for the Real captain, who faces a Uefa investigation into whether he deliberately got booked late on in Wednesday's 2-1 win at Ajax in the first leg of their Champions League last-16 tie - to receive a suspension now and not later on in the competition.

Ramos had been quoted as telling reporters he would "be lying if I said I didn't force [the booking]", but later posted on social media that he had "not forced the card".

Sergio Ramos has been sent off once and booked seven times in his past 14 matches

Changes backfire for Real boss Solari

Real, who started the weekend in second place in the table, are now third, nine points behind leaders Barcelona, who won 1-0 against Real Valladolid on Saturday.

Atletico Madrid are now second, two points clear of city rivals Real, following their 1-0 victory over Rayo Vallecano.

Real boss Santiago Solari made six changes to face Girona, with Wales forward Gareth Bale among the substitutes and midfielder Luka Modric missing through suspension.

Away keeper Yassine Bounou denied Lucas Vasquez before Casemiro's header gave the hosts the lead. Karim Benzema and Marcelo had further chances saved, and Benzema also headed into the side netting as Real pushed for a second.

However, the visitors - who had not won in their previous 13 matches - fought back. Aleix Garcia wastefully shot over from six yards out and Stuani headed against the post before Ramos charged down the follow-up shot with his hands and Stuani equalised from the spot.

Bale came on in the 67th minute, but was unable to prevent his side losing their grip on the match. Portu hit the crossbar and then scored a 74th-minute winner to severely dent Real's hopes of becoming Spanish champions this season.

'A fair result' - what they said

Real Madrid boss Santiago Solari said: "Girona were better in the second half, they caused us a lot of problems. We've been on a good run and today we did not do the same things.

"We tried to increase our energy levels with our changes but we did not achieve it - we have a big squad and a lot of good players.

"We did not take our chances when we had them and it was really difficult for us in the first 25 minutes."

Asked if they still had a chance of winning the league, Solari added: "Always. We are always in it. We need to get good results as soon as possible, but we're still in three competitions."

Girona manager Eusebio Sacristan said: "It's really important for us to win at the Bernabeu - for our fans, for our team.

"Maybe they were thinking they would get a second goal, but we were slowly getting back into it and getting more confident. At the end of the game it is a fair result.

"We had not won for a few games and had a tough few weeks. But we showed our attitude, and what better ground to do it in."