Messi took his league goals tally to 27 for the season and 42 in all competitions although third-placed Valencia had stunned the Spanish and European champions by taking a shock early lead.

"The most important thing was that the team played like we did against Bayer Leverkuson in the Champions League in midweek when we won 3-1," said Messi after his Camp Nou masterclass.

"There are lots of crucial challenges ahead and it's necessary to keep going like this."

Barca coach Pep Guardiola saluted his team and insisted that they do not deserve to be so far off the pace in the title chase.

"With the football we have played we don't deserve to be so far behind but our challenge now is to keep the title race open and that is down to us," he said.

"We need to compete for the next three months just like we have done in this match.

"We are lucky to have such a generation of players. It's a privilege to work with such fantastic lads. They are a credit to the sport."

The pressure was on the Catalan side after defeat last weekend away to Osasuna and they got off to a poor start with Pablo Piatti giving Valencia the lead after nine minutes.

Martin Montoya, in the side with Dani Alves suspended, and Gerard Pique left Piatti unmarked and keeper Victor Valdes came and failed to reach a Sofiane Feghouli cross allowing the diminutive striker to tuck the ball in.

The home fans were becoming restless but Messi responded once again when his side needed him most with two goals in five minutes.

Adil Rami failed to clear a cross and Messi coolly finished from a tight angle.

The Argentine then got ahead of the Valencia defence to meet an Eric Abidal cross and while the keeper Diego Alves saved his initial shot, he was able to sweep in the rebound.

Alexis Sanchez and Cesc Fabregas were both denied by Alves while the former Arsenal player then hit the woodwork with an acrobatic effort.

The home side continued to push forward after the break with Alves stopping a Messi header with a wonderful save and Fabregas badly miscued before Messi gave Barca a cushion by firing in a rebound after another Alves block.

Messi completed his hat-trick with 15 minutes to go and then notched up his 42nd goal of the season after running clear of the defence and clipping the ball over the keeper.

With the Valencia defence in disarray substitute Xavi Hernandez lobbed the ball over the keeper for the fifth in injury time.

Despite the rout, Barca are still struggling to retain their title after Real Madrid had swept past Racing Santander 4-0 on Saturday.