Sergio Ramos scored on a header off Luka Modric's corner kick in the 82nd minute, and Real Madrid beat Barcelona 2-1 Saturday in the Spanish league for its second victory in five days over its rival.

Karim Benzema put Real Madrid ahead in the sixth minute, but Lionel Messi tied the score in the 18th minute, reaching 50 goals for the third straight season and extending his record La Liga scoring streak to 16 games. With his 18th clasico goal, Messi tied the record set by Real's Alfredo Di Stefano.

Preparing for Tuesday's Champions League match against Manchester United, Real Madrid rested Cristiano Ronaldo until the 58th minute.

Defending champion Real Madrid (17-5-4) pulled within 13 points of first-place Barcelona (22-2-2) and within one point of second-place Atletico Madrid (18-5-2). Real won 3-1 at Barcelona on Tuesday to advance to the Copa del Rey final on 4-2 aggregate.