1 of 4
Daniel Ochoa de Olza, Associated Press
Real Madrid's Sami Khedira from Germany celebrates after scoring during a Spanish La Liga soccer match against Barcelona at the Camp Nou stadium, in Barcelona, Saturday, April 21, 2012.

BARCELONA, Spain — Cristiano Ronaldo's late goal dealt Barcelona its first loss in 54 home games and put Real Madrid on the cusp of breaking the Catalan giants' three-year hold on the Spanish league crown with a record-setting 2-1 win on Saturday.

Sami Khedira opened with Madrid's league-record 108th goal of the season and Ronaldo sealed the victory with his own league-record 42nd goal moments after Alexis Sanchez leveled for Barcelona.

Madrid's 19th league game without a loss lifted it seven points clear of Barcelona at the top of the standings with just four rounds to go.

After managing only a single win in nine previous games against Barcelona since joining Madrid, coach Jose Mourinho finally guided his team to a long-coveted victory over its fierce rivals on their ground.