BARCELONA, Spain - Cristiano Ronaldo earned a straight red card for kicking an opponent late in Real Madrid's 2-1 win at Cordoba on Saturday as Gareth Bale snatched a winner for the Spanish league leaders with an 89th-minute penalty.

The victory put Madrid four points ahead of Barcelona before it visits Elche later.

Ronaldo had been held in check until the 82nd when his frustration boiled over as he lashed out in anger at defender Edimar.

Bale rallied Madrid when he earned a free kick and sent his strike into the defensive wall, where Fede Cartabia used his hand to block it. Bale then converted the resulting spot kick.

Nabil Ghilas opened the scoring with a penalty two minutes in. Karim Benzema equalized for Madrid in the 27th.