Messi and Ronaldo will go head to head in the Copa del Rey in midweek and they warmed up for the latest El Clasico in style on Sunday night.
Argentine superstar Messi scored four times as Barcelona bounced back from their first Primera Liga defeat of the season to re-establish their dominance at the top of the table.
Messi netted twice in each half, his second a penalty, while Pedro was also on target for the Catalans.
Raoul Loe briefly levelled for Osasuna before Alejandro Arribas' sending-off after 27 minutes made their task an almost impossible one.
Ronaldo grabbed a second-half hat-trick to help Real keep up their pursuit of second place, after Sergio Ramos had opened the scoring for Getafe.
The Portuguese forward showed all his class for his first goal as he cut inside and tucked home a low finish, while he then added a simple header and a penalty.
Atletico Madrid are now just four points clear of Real in second after Athletic Bilbao gained some measure of revenge for last season's Europa League final as they ran out 3-0 winners at San Mames.
Both Thibaut Courtois and Gorka Iraizoz had produced remarkable saves from Markel Susaeta and Emre respectively to keep the scores level at half-time, but the hosts were in front within five minutes of the restart as Mikel San Jose nodded home from Susaeta's corner.
Susaeta then finished the game as a contest with a neat finish from Ander Herrera's through ball 13 minutes from time and Oscar de Marcos rounded off a fine night for the hosts when he stroked home Aritz Aduriz's cross at the end of a flowing counter-attack seven minutes later.
Malaga bounced back to winning ways with a hard-fought 3-2 victory over relegation-threatened Real Mallorca despite playing the final 18 minutes with a man less.
Early goals from Javier Saviola and Isco put Malaga in charge and Nacho Monreal restored the visiting side's two-goal lead in the second half after Victor Casadesus had pulled a goal back for the hosts.
However, from a position of strength Malaga found themselves under serious pressure after conceding a second Mallorca goal to Giovani dos Santos in the 71st minute and then losing Martin Demichelis to a red card 60 seconds later.
Rayo Vallecano moved to within a point of the Primera Division's top four with a comprehensive 3-0 win over Real Betis at Vallecas.
A fourth-minute penalty from Piti got the hosts off to a flying start and they might have been even further ahead by the break had Roberto Trashorras not seen a fine effort come back off a post.
Andrija Delibasic would eventually double Rayo's advantage, heading home Jose Casado's cross at the end of a wonderful team move midway through the second-half, and Jose Carlos rounded off the scoring with a neat finish eight minutes from time.