Match ends, Córdoba 1, Real Madrid 2.
Gareth Bale's late penalty ensured La Liga leaders Real Madrid overcame Cristiano Ronaldo's dismissal to secure a hard-fought victory over Cordoba.
Nabil Ghilas' early penalty meant Real had to fight back, which they initially did through Karim Benzema's equaliser.
Their chances of victory seemed lost after Ronaldo was sent off for lashing out at Edimar in the 82nd minute.
But Fede Cartabia saw red for handling in the box and Bale scored from the spot to keep Real top of the table.
The win keeps Carlo Ancelotti's side one point ahead of second-placed Barcelona, who beat Elche 6-0 on Saturday.
It also gives them a third straight La Liga victory after their 22-game winning streak in 2014 was brought to an end by Valencia on 4 January.
They were forced to do it the hard way, though, after Ghilas' second-minute spot-kick - awarded for handball in the box by Sergio Ramos - had given Cordoba the lead at the Nuevo Estadio El Arcangel.
Benzema's 15th goal of the season, from close range, ensured that despite their poor showing, Real went in at the break level.
But they failed to improve after the break and, in his frustration, Ronaldo's petulant kick earned him his ninth career dismissal, for which he later apologised via Twitter.
However, Ancelotti's men still managed to grind out a vital victory when Bale successfully took over penalty duties from his departed Portuguese team-mate after Cartabia clearly handled the Welshman's initial free-kick.
- 1Martín Corral
- 15Rodríguez Barrera
- 7RossiBooked at 58mins
- 24Dias Correia
- 10Nicolás CartabiaBooked at 87mins
- 28AndoneSubstituted forVico Villegasat 80'minutes
- 19López de Silva Sánchez
- 22López Garai
- 23Gómez Moreno
- 35Vico Villegas
- 39Agulló Sevilla
- 15CarvajalBooked at 74mins
- 4RamosBooked at 2mins
- 12MarceloSubstituted forda Silva Coentrãoat 72'minutes
- 6KhediraBooked at 63minsSubstituted forIllarramendiat 64'minutes
- 10RodríguezSubstituted forRodríguez Ruizat 80'minutes
- 7Cristiano RonaldoBooked at 82mins
- 5da Silva Coentrão
- 20Rodríguez Ruiz
- Alejandro José Hernández Hernández
- Shots on Target
Second Half ends, Córdoba 1, Real Madrid 2.
Goal! Córdoba 1, Real Madrid 2. Gareth Bale (Real Madrid) converts the penalty with a left footed shot to the centre of the goal.
Second yellow card to Fede Cartabia (Córdoba) for hand ball.
Penalty conceded by Fede Cartabia (Córdoba) with a hand ball in the penalty area.
Attempt blocked. Gareth Bale (Real Madrid) left footed shot from outside the box is blocked.
Gareth Bale (Real Madrid) wins a free kick in the attacking half.
Foul by Edimar (Córdoba).
Cristiano Ronaldo (Real Madrid) is shown the red card for fighting.
Foul by Cristiano Ronaldo (Real Madrid).
Edimar (Córdoba) wins a free kick in the defensive half.
Fábio Coentrão (Real Madrid) wins a free kick on the left wing.
Foul by Nabil Ghilas (Córdoba).
Attempt missed. Fausto Rossi (Córdoba) right footed shot from outside the box is too high. Assisted by Edimar following a corner.
Attempt missed. Edimar (Córdoba) left footed shot from outside the box misses to the right following a corner.
Corner, Córdoba. Conceded by Raphael Varane.
Attempt blocked. Nabil Ghilas (Córdoba) left footed shot from outside the box is blocked.
Substitution, Real Madrid. Jesé replaces James Rodríguez.
Substitution, Córdoba. Fede Vico replaces Florin Andone.
Attempt missed. Sergio Ramos (Real Madrid) header from the centre of the box is just a bit too high. Assisted by Toni Kroos with a cross following a corner.