Last updated on .From the section European Football

Lionel Messi's hat-trick helped Barcelona sweep aside Osasuna to close the gap on Real Madrid and Atletico Madrid in the Spanish title race.

Argentina star Messi glanced in at the near post, before Alexis Sanchez tucked in Jordi Alba's low centre.

Andres Iniesta's stinging 25-yarder put Barca in complete command at the break.

Two more Messi goals, along with late strikes from Cristian Tello and Pedro, saw Barca warm up for next Sunday's El Clasico against Real with an easy win.

Magical Messi Lionel Messi - La Liga's third highest goalscorer of all time - has now scored 232 goals for Barcelona in the Spanish top-flight. He is now two behind ex-Real Madrid and Atletico Madrid striker Hugo Sanchez, who scored 234 times between 1981 and 1994. Athletic Bilbao's Telmo Zarra is out in front with 252 goals between 1940 and 1955.

Defending champions Barca travel to the Bernabeu knowing they need to beat their arch-rivals to stand any realistic chance of retaining the La Liga title.

Gerardo Martino's men are four points behind leaders Real, and one adrift of Atletico, with 10 matches left to play. Both Madrid sides earned narrow 1-0 wins on Saturday.

Even if the Catalans win in the Spanish capital, they are relying on other teams to take points off a Real side unbeaten in 18 league matches.

After suffering a shock 1-0 defeat at Real Valladolid last weekend, Barca boss Martino demanded his team "change their image" against Osasuna. And the Argentine watched his players respond with a contrasting performance at the Nou Camp.

The hosts were intent on taking control before half-time, scoring three goals in the space of 16 minutes, to leave relegation-threatened Osasuna floundering.

Already Barcelona's all-time leading goalscorer in competitive matches, Messi's treble took him past Paulino Alcantara's club record of 369 goals in all matches including friendlies.

He poked in the opener from Sanchez's right-wing cross before Barca left-back Alba, after a neat one-two with Iniesta, supplied a low ball from the left for the Chilean to tuck in.

Iniesta netted his first goal from open play since the final day of last season and then combined with Messi, who arrowed in from a tight angle, for the fourth.

But rampant Barca refused to ease off. Three goals in the final 12 minutes saw Martino's men rack up a seven-goal haul for the second time this season, following the opening-day thrashing of Levante.

Substitute Tello, in his first involvement after replacing Sanchez in the 77th minute, cut in from the left and danced past a number of Osasuna defenders to bend in.

Messi converted a Dani Alves pass for his 31st of the season, before turning provider for Pedro to complete the rout.