Real Madrid played one of their worst matches of the season but managed to take all three points home thanks to a last-minute penalty kick.
Cordoba fought bravely and forced Los Blancos to make one mistake after another. They took the lead with an early penalty goal from Nabil Ghilas and had plenty of chances to score more, but the hosts came back with goals from Karim Benzema and Gareth Bale.
Cristiano Ronaldo illustrated Los Merengues desperation in the second half as he was sent off for striking a rival in the face.
Cordoba made it 1-0 after three minutes thanks to a doubtful penalty call from the referee. Sergio Ramos was penalised for hand ball and Ghilas coolly converted with a precise shot to the top corner.
The hosts played with very high intensity during the first minutes, and they could have made it 2-0 as Bebe led a counter-attack but failed to find Ghilas with his cross.
Without Isco in midfield, Carlo Ancelotti men lacked creativity and they struggled to threaten goalkeeper Juan Carlos, with Cordoba keeping their lines tightly closed.
Yet, the hosts conceded too many corner kicks and Los Blancos leveled in one of them. James Rodriguez sent a great cross into the box, Gareth Bale headed and the ball ended in Benzema’s foot. The Frenchman poked home from close-range to make it 1-1.
Cordoba kept on exerting a very high pressure on Los Blancos in the second half. The visitors never felt comfortable and made many defensive mistakes, allowing the Andalusians to threaten Iker Casillas.
Fede Cartabia almost scored as he dribbled Sergio Ramos and sent a powerful strike from outside the box just a few centimeters wide of the crossbar.
Florin Andone had a major chance following another mistake from Raphael Varane, who headed the ball too short back to Casillas. The Rumanian stole it and lifted it over the keeper, but his shot hit the bar.
Los Blancos were becoming more desperate every minute, and Cristiano Ronaldo proved it with an aggression that cost him a red car. The Portuguese stroke Edimar in the face.
Despite their poor performance during the previous 97 minutes, Los Merengues were lucky to have a penalty awarded with three minutes to go as Cartabia blocked Bale’s free kick with his raised hand.
The Argentinian was shown his second yellow card and the Welshman fired his spot kick past the keeper to give Los Blancos a last-minute win.