Lionel Messi scored his 644th goal for Barcelona during his side’s victory over Real Valladolid to break Pele’s record of the most goals for one club.
Argentina forward Messi, 33, scored Barca’s third when he collected Pedri’s backheel, took a touch then slotted the ball past goalkeeper Jordi Masip.
Messi created the first goal when his cross was headed in by Clement Lenglet and started the move for the second, finished off by Martin Braithwaite.
Messi also hit the post in injury time.
Brazil great Pele scored 643 goals in 19 seasons for Santos in his homeland between 1956 and 1974.
Messi, who scored his first goal for Barca in 2005 and has gone on to win 10 La Liga titles and four Champions Leagues, is out of contract at the end of the season and able to talk to other clubs from January.
In August, he said he wanted to exercise a clause in his deal which he said allowed him to leave on a free transfer, but Barcelona refused, saying his 700m euro (£624m) release clause had to be met.
Earlier this week, Messi said the incident caused him to have “a very bad time in the summer”, although he was in superb form against Valladolid on Tuesday, inspiring a win that took Barcelona back up to fifth, eight points behind leaders Atletico Madrid.
Barca could have scored more goals but Masip made a number of fine saves and substitute Philippe Coutinho also hit the woodwork late on.
Marc-Andre Ter Stegen made two one-handed saves to deny Fabian Orellana and Kike Perez, preserving Barcelona’s clean sheet.
Earlier on Tuesday, Atletico beat third-placed Real Sociedad 2-0 thanks to goals from Mario Hermoso and Marcos Llorente to go three points clear of Real Madrid, who play Granada at home on Wednesday (18:45 GMT).
Source: BBC Sports