BARCELONA, Spain (AP) — Lionel Messi set another scoring record by netting a hat trick to pace Barcelona's 7-0 rout of Osasuna in the Spanish league on Sunday, ensuring the defending champions stayed in striking distance of leader Real Madrid before their critical "clasico" match next week.
The three goals bring Messi's career tally for Barcelona to 371 in all games — including friendlies — breaking the club record of 369 held by Paulino Alcantara since 1927. The 26-year-old Messi was already the club's all-time leading scorer in official games.
Messi assured Barcelona's fans they will enjoy his goals for years to come, saying "as long as people want me, I will stay here. My intention is to retire wearing the Barcelona shirt."
The Argentina forward netted from close range to open the scoring at Camp Nou in the 18th minute. Alexis Sanchez made it 2-0 four minutes later before Andres Iniesta scored just his second goal of the season in the 34th.
Messi struck twice more in the second half, either side of Cristian Tello's goal, to give him a team-leading 18 league goals this campaign, before he set up Pedro Rodriguez.
It was Messi's 20th career hat trick for Barcelona, to go with four four-goal games and one five-goal outing.
Barcelona remained in third place, four points behind Madrid, ahead of their meeting in the Spanish capital next Sunday.
Barcelona's big win, which matched its scoreline over Levante to start the season, came one week after it slumped to a 1-0 loss at Valladolid, which cast doubts on the team's ability to stay in the race for the league title with Madrid and second-place Atletico Madrid.
But its victory midweek over Manchester City in the Champions League and this dominant performance appear to have restored its credit as a contender before Gerard Martino's team faces Madrid in a game that may go a long way to deciding the title.
"We hope we can play a great game," Messi said about the upcoming clash at the Santiago Bernabeu. "We know it will be difficult, but we will do all we can to fight for the league title until the very end. We received a lot of criticism after the Valladolid match. We knew we didn't play well and this (win) boosts our confidence."
Also, striker Imanol Agirretxe's second-half header gave Real Sociedad a 1-0 win at home over Valencia, provisionally lifting the Basque side into fifth place. Villarreal can move back ahead of Sociedad on Monday when it hosts fourth-place Athletic Bilbao.
Kevin Gameiro scored a double as Sevilla eased to a 4-1 win over Valladolid at home. Ivan Rakitic and Diogo Rosario also scored for Sevilla before Javi Guerra got Valladolid's consolation goal.
Real Betis drew 0-0 at Elche as it remained stuck at the bottom of the standings and winless in all 14 away games this season.
Osasuna's away woes continued as it again proved to be far from the side that has taken points from Barcelona, Madrid and Atletico this season in Pamplona.
The visitors started as the more aggressive side, but Messi quickly ended thoughts of an upset when he glanced in Alexis' low cross from a tight angle.
Messi's goal ignited Barcelona's attack, which put on an overwhelming passing display to secure the three points before halftime.
Left back Jordi Alba worked a one-two combination with Iniesta before picking Alexis out arriving to the penalty spot where the Chile forward netted his 17th league goal of the season.
It was then Iniesta's turn to take a rare goal with a stinging left-footed strike from outside the area that flew past goalkeeper Andres Fernandez before landing in the far corner of the net.
Barcelona kept pouring it on. Dani Alves, Xavi Hernandez and Iniesta all drew saves from Fernandez on both sides of halftime, while Pedro went close twice.
Messi hit again in the 63rd after he and Iniesta broke down Osasuna's left flank with a series of exchanges before firing home.
Tello went on in the 76th and two minutes later he lashed in a long-range shot for Barcelona's fifth to completely demoralize Osasuna before Messi scored from a pass by Dani Alves in the 88th and laid off for Pedro to round out the demolition in injury time.