David Beckham's hopes of finishing his Real Madrid career with a Spanish league title remain alive after an extraordinary Saturday in La Liga.
Van Nistelrooy now has 25 league goals, and 33 in total, this season
With two minutes left Barcelona led Espanyol 2-1 at the Nou Camp and Real trailed 2-1 at Real Zaragoza.
But Ruud van Nistelrooy's second equaliser of the game, his 33rd goal of the season, secured Real a 2-2 draw.
Then Espanyol equalised in the final minute at Barcelona to leave Real still on top going into the final round.
Sevilla, who were held 0-0 at Mallorca, also remain in title contention but trail Real and Barca by two points.
The two leaders have the same points tally but Real, despite an inferior goal difference, are ahead because of their superior head-to-head record.
Victory in their final match at home to Mallorca next Sunday will see Real clinch their first title in four years, while Barcelona travel to relegated Gimnastic and Sevilla host Villarreal.
Beckham, who started the game despite the ankle injury he suffered on England duty against Estonia, appeared to aggravate the problem and required treatment on the pitch at one point.
Beckham needed more treatment on his left ankle
But he continued to the end despite enduring a frustrating game until Van Nistelrooy's late intervention.
Real went behind after half an hour when defender Ivan Helguera impeded Pablo Aimar to concede a penalty which Diego Milito tucked away.
Van Nistelrooy was denied by Zaragoza keeper Cesar Sanchez just before the interval as Real trailed 1-0 at half-time, but the Dutchman equalised with a precise downward header after 56 minutes.
It was the former Manchester United striker's 14th goal in his last 14 games, equalling Real legend Hugo Sanchez's record of scoring in seven consecutive matches in the process.
Madrid appeared to be heading for defeat when Milito, set up by Aimar, cooly slotted home his second after 63 minutes.
But Van Nistelrooy's predatory instincts, forcing the ball home with two minutes left for his 10th goal in his last seven games, secured Real a point.
Lionel Messi scored a controversial 'handball' goal for Barcelona
One more goal against Mallorca next Sunday would give the Dutchman a share of the Golden Boot, awarded to Europe's most prolific domestic goalscorer, with Roma's Francesco Totti.
His strike proved even more priceless to the Real players when news filtered through that Raul Tamudo's last-minute equaliser for Espanyol had seen Barcelona surrender the title advantage in dramatic fashion.
The champions had earlier been indebted to a controversial 'handball' goal by Lionel Messi.
With his side trailing 1-0 to their city rivals, the Argentine wing took a leaf out of compatriot Diego Maradona's book to launch himself at a Gianluca Zambrotta cross and steer the ball with his hand past Espanyol keeper Carlos Kameni.
The protests to the referee by the Espanyol players were to no avail.
An authentic strike from Messi early in the second half put Barcelona in the driving seat before the late drama in both matches.