(CNN) -- Lionel Messi's sixth hat-trick of 2010 helped Barcelona demolish Almeria 8-0 on Saturday night, but three goals from Cristiano Ronaldo kept Real Madrid on top in Spain ahead of next Monday's "Clasico" clash between the La Liga giants.
Messi reached the milestone of 100 league goals for Barcelona in just 154 appearances for the defending champions, and has already scored 22 this season in all competitions.
His third goal briefly lifted him above Ronaldo as the league's top scorer on 13, putting the visitors seven up before the Argentine laid on substitute Bojan Krkic's second goal with 17 minutes to play.
Barcelona led 5-0 at the halftime break, with Messi breaking the deadlock in the 17th minute after combining well with David Villa.
Andres Iniesta made it 2-0 a minute later after woeful defending by Almeria, with his misplaced cross fortuitously rebounding back into his path, then Peru defender Wilmer Acasiete turned Maxwell's low cross into his own net on 27.
Pedro embarrassed the onrushing Diego Alves eight minutes later as he easily won the race to a long ball in the 35th minute, then soon after Messi netted from the winger's low cross at the second attempt after the goalkeeper parried his first.
Messi helped set up Bojan's first in the 62nd minute, with the 20-year-old showing nimble feet before dinking the ball over Alves.
The beleaguered Alves could only parry Villa's shot into Messi's pass for the seventh, and Bojan made no mistake when sent free down the middle to seal the biggest win of the Spanish season so far and leave Almeria in the bottom three.
The home side had conceded only 10 goals in 11 games -- the third best defensive record in the league behind Real and Barcelona -- but coach Juan Manuel Lillo was sacked after the match.
Barcelona travel to Greece on Wednesday to face Panathinaikos in the Champions League, then host Real in a Monday fixture forced due to security concerns over the Catalan elections that weekend.
Real Madrid will take a one-point lead into that match following the 5-1 victory at home to Athletic Bilbao in the late match, as coach Jose Mourinho completed his two-match touchline ban.
With the Portuguese boss watching from various positions in the stands, Real almost went behind in just the second minute when defender Pepe had to clear off the line from Fernando Llorente.
But Gonzalo Higuain put Real ahead in the 19th minute with a clinical low finish after fellow Argentine Angel Di Maria slipped a low pass into the penalty area, and Ronaldo doubled the lead on the half-hour after Mesut Ozil cleverly knocked the ball into his path.
Spain striker Llorente reduced the deficit five minutes before halftime from close range with his ninth league goal of the season, but Real restored their two-goal buffer 11 minutes after the break.
Di Maria duped Markel Susaeta into bringing him down just inside the box, and defender Sergio Ramos surprisingly stepped up to smash home the resulting penalty for his first goal of the campaign.
Ronaldo effectively sealed the win in the 62nd minute with a swerving free-kick that wrongfooted goalkeeper Gorka Iraizoz could only palm into his net.
The Portugal forward then netted his 15th league goal this season -- and 17th overall -- from the penalty spot in time added on after substitute Esteban Granero was brought down, despite having to retake the kick after illegally stopping in his initial run-up.
Bilbao, who hit the bar through Javi Martinez in the 87th minute, were left in ninth place -- 16 points behind Real.
Villarreal retained third place after coming from behind to earn a 1-1 draw at home to 10-man Valencia, who stayed fourth.
Aritz Aduriz put Valencia ahead in the 20th minute with a deflected shot as Villarreal -- who had won all five previous home matches this season -- conceded at El Madrigal for just the second time.
Italy forward Giuseppe Rossi gave his side a lifeline in the 73rd minute with a volley for his eighth La Liga goal of the campaign as his team now trail Real by eight points.
Valencia lost Lithuania defender Marius Stankevicius to a second yellow card with 10 minutes to go, but held on for the draw ahead of Wednesday's Champions League clash with Turkish side Bursaspor.