Messi took his league tally in 21 games this season to an incredible 33, and to 202 overall, in Barca's 5-1 win at home to 10-man Osasuna while Ronaldo passed 300 club goals and now has 21 this term as Real thumped Getafe 4-0 at the Bernabeu.
Barca's return to winning ways after last weekend's 3-2 reverse at Real Sociedad, their first defeat of the campaign, put them 11 points clear of second-placed Atletico Madrid who lost 3-0 at Athletic Bilbao.
Champions Real, whose hopes of a second straight title are effectively over with 17 matches to go, are four points behind Atletico in third spot.
Malaga reclaimed Spain's fourth Champions League qualification berth from Andalusian rivals Real Betis when the Qatar-owned club survived the second-half dismissal of Martin Demichelis to win 3-2 at struggling Real Mallorca.
Malaga have 35 points, eight behind Real, and lead Betis on goal difference. Rayo Vallecano continued to defy their modest status and are a point behind Betis in sixth place after they beat the Seville-based side 3-0.
World Player of the Year Messi became the first player to score on 11 successive La Liga matchdays and, at 25, the youngest to reach 200 league goals.
He has scored more goals on his own than all the other La Liga teams apart from Real and Atletico and is on course to smash the record for the most in a season (50) he set last term.
The Argentina forward opened the scoring in the 11th minute at the Nou Camp when he was sent clear in the penalty area by a pinpoint Xavi pass.
Messi cleverly waited for Osasuna goalkeeper Andres Fernandez to go to ground before walking the ball into the net.
The visitors, who are third from bottom on 18 points, equalised in the 24th minute through midfielder Raoul Loe but their chances of causing an upset were ended when Alejandro Arribas was shown a second yellow card three minutes later.
Defender Arribas handled in the penalty area and Messi hammered the ball home from the spot before Daniel Alves unselfishly set up Pedro to tap in Barca's third goal five minutes before the break.
Messi, who also headed against the post in the first half, completed his hat-trick in the 56th minute and grabbed a fourth goal two minutes later.
"The important thing was to get through the match because when so much is being said about the 'Clasico' (against Real) it's not easy," Messi told reporters.
"We came out the same way as always and we achieved our goal."
- Sports & Recreation
- Atletico Madrid
- Real Sociedad
- Real Betis