CNN  — 

Lionel Messi scored his 644th goal for Barcelona on Tuesday, surpassing Pele’s longstanding goalscoring record for a single club.

The Argentine drew level with the Brazilian legend’s total of 643 last weekend and set the new landmark after slotting home against Valladolid on Tuesday, as netted the third goal in Barcelona’s 3-0 victory.

“When I started playing football, I never thought I’d break a record,” Messi wrote on Instagram on Tuesday.

READ: Blink and you’ll miss it – Rafael Leao scores fastest goal in Serie A history

Messi eyes the ball during Barcelona's game against  Valladolid.

“Even less so the one I achieved today which Pele held … I can only give my thanks to all those who helped me throughout the years, my teammates, my family, my friends and all those who support me every day. Much love!!”

Former England international Gary Lineker encapsulated the magnitude of the Barca star’s achievement tweeting: “To beat Messi’s 644 goal record, someone will have to score an average of 43 goals a season for 15 years….for one club.”

Pele, widely considered one of the greatest footballers of all time, scored 643 goals for Brazilian club Santos between 1956 and 1974.

Brazilian striker Pelé, wearing his Santos jersey, smiles before playing a friendly match in 1961.

Messi’s eye-watering 644 goals for Barca have spanned 17 seasons and come in 749 games.

German striker Gerd Muller came closest to matching Pele’s one-club goal-scoring feat. He netted 565 times for Bayern Munich between 1964 and 1979.

Fernando Peyroteo is next on the list of all-time highest leading scorers after he scored 544 goals for Sporting CP between 1937-49. Josef Bican is next with 534 goals for Slavia Prague.

Messi, who made his debut in 2004, has won 10 La Liga titles and four Champions Leagues with the Catalan club. He scored his first goal in 2005.

Visit CNN.com/sport for more news, features, and videos

Messi celebrates with Pedri after scoring his side's third goal against Valladolid.

The 33-year-old might have had more goals on Tuesday against Valladolid, hitting the post in the closing stages the game>

Messi also played vital roles in the opening two goals, crossing for Clement Lenglet to head Barcelona into the lead and also playing in Sergino Dest to cross for Martin Braithwaite to double Barca’s advantage.