BARCELONA, Spain (AP) – Cristiano Ronaldo scored two goals in a three-minute span to give 10-man Real Madrid a 4-3 win over Real Sociedad on Sunday, after coach Jose Mourinho's decision to drop goalkeeper Iker Casillas almost backfired for a second straight game.
Despite heavy criticism after last round's loss, Mourinho again started rarely used Adan Garrido, but the keeper was sent off after giving away an early penalty.
Casillas then came on but couldn't stop Xabi Prieto's resulting spot kick to cancel out Karim Benzema's opener, and it was 2-2 at halftime after Prieto leveled again following Sami Khedira's goal.
Ronaldo scored on the break in the 68th before hitting the winner from a free kick in the 70th. But Prieto wasn't done and scored his hat trick in the 76th to keep the wild shootout in doubt until the final whistle.
Madrid's first victory in three games left it in third place, 13 points behind leader Barcelona and four points behind Atletico Madrid before their games later.
The crowd at Santiago Bernabeu stadium voiced its displeasure with Mourinho's continued benching of Casillas by jeering the coach's name when it was announced before the game and cheering for their beloved star.
Mourinho said he wasn't bothered by the boos.
''Perfect. They can whistle at me if they want and then support the team,'' said Mourinho. ''I think the jeers are for dropping Casillas, and I think that they are because we are far from our objectives in the league. I accept them both.
''I told Adan before this match and the Malaga match that the jeers he might hear were for me, not for him. There's has been a lack of respect for Adan.''
Madrid's fans, however, couldn't have asked for a better start just two minutes in when Sociedad's unbalanced defense left Benzema unmarked to receive Khedira's pass and slot beyond the stranded Claudio Bravo.
But Madrid's lead didn't last long when Mourinho's choice in goal again proved misguided.
Adan was overwhelmed last round when he conceded three goals in the loss at Malaga, and he was soon shown to be out of his depths at home as well.
The regular backup made a poor pass that Carlos Vela intercepted, and he then charged out and tackled the Mexico forward in his box.
The referee didn't hesitate to show him a direct red card, creating the dramatic situation of Casillas being called off the bench to defend the penalty try.
The crowd chanted ''Iker! Iker!'' as the Spanish international jogged on, but there were no heroics as Prieto coolly stroked in the spot kick to equalize in the ninth.
Despite being short a man, Madrid pressed forward and deservedly went in front in the 35th through Khedira's crafty back-heeled flip to redirect a cross between the posts.
Prieto beat Casillas to restore parity at 2-2 five minutes later when he pounced on a rebound inside the area.
But Ronaldo gave Madrid control of the match when Benzema stole the ball in midfield and played the Portugal winger behind the defense for him to score.
Ronaldo then earned a free kick on the left corner of the area and blasted the ball over goalkeeper Claudio Bravo for his 16th goal in the league this season.
Madrid striker Gonzalo Higuain went on as a substitute for his first action since being sidelined for two months with a leg injury and quickly found the woodwork.
Prieto appeared to give Sociedad a late hope when he shot inside the far post, but Sociedad never threatened again after Daniel Estrada was booked for a second time, leaving the visitors with 10 men for the final 10 minutes.
Ronaldo will miss his team's next Spanish league game at Osasuna serving a one-game ban.
Ronaldo picked up his fifth yellow card of the season on Sunday when he fouled Real Sociedad's Carlos Vela from behind, meaning that he will be suspended for one match.
Madrid saw Gonzalo Higuain return after a two-month injury layoff, so it is possible that the Argentina striker will fill in for Ronaldo for next week's game at Pamplona.