Real beat Deportivo Coruna, 3-1, to remain in control of the race with two games to play. It is tied with Barcelona, 1-0 winner over Getafe, but has won the tie-breaker (head-to-head record).
Barcelona's title chances took a blow when star Ronaldinho was sent off late in the first half against Getafe and faces the prospect of missing the last two games of the season if Barcelona's appeal isn't upheld.
The Brazilian star, who scored the game's only goal in the second minute on a feed from Lionel Messi, was then sent off just before halftime for kicking out at Getafe defender David Belenguer in retaliation to a foul. Although he barely appeared to make contact, referee Perez Burrull showed Ronaldinho the red card.
After the game, Barcelona coach Frank Rijkaard complained of Getafe's rough play.
Raul broke a 1-1 tie with a goal in the 58th from a cross by David Beckham. Raul was playing in his 605th game for Madrid, matching Francisco Gento's record of matches with Madrid.
Defender Sergio Ramos and Ruud van Nistelrooy also scored for Madrid, which wins the title if it wins at Real Zaragoza and beats Mallorca in its last two games. Barcelona faces Espanyol and relegated Gimnastic Tarragona in its last two games.
Sevilla, which trails the leaders by two points, kept itself in the title race with an exciting 3-1 home victory over Real Zaragoza on goals by Luis Fabiano, Alexander Kerzhakov and Frederic Kanoute.
Fourth-place Valencia dropped out of the title race after losing, 3-2, at home to neighbor Villarreal on Saturday.