Lionel Messi has agreed to a new contract with Barcelona, tying him to the club until 2021.
The forward's previous deal was due to expire in 2018, with the three-year extension ensuring he is contracted at Camp Nou for at least the next four years.
Formal signing of the contract is set to take place after Messi, currently on his honeymoon after his wedding to Antonella Roccuzzo, has returned for preseason training.
Barca hailed the Argentina international as it announced the deal, labeling him "the best player in history".
"Barcelona and Leo Messi have agreed on a contract renewal that will keep the Argentinian at the club until June 30, 2021," read the club's statement Wednesday. "The deal will be signed in the coming weeks, when Messi returns to the team for preseason training.
"The club is very happy with both the renewal and the commitment of Messi, the best player in history, who has played his full professional career at Barca and has led the team to an era of extraordinary success, the likes of which has never been seen in world football."
The exact value of his release clause has not been disclosed, but it is reported to be in the region of €300million (almost $340 million).
Messi, who turned 30 last month, has spent his entire senior career with Barcelona and made his debut in 2004.
In an astonishing career, he has won LaLiga eight times and the Champions League on four occasions, among a total of 29 club trophies.
He has scored a record 507 goals for Barcelona and netted 54 times in 52 appearances last season.
Messi has won the Ballon d'Or five times, although just one of those awards came in the last four years, with Real Madrid's Cristiano Ronaldo expected to win again in 2017.
The Argentina international will turn 34 as this new contract reaches its conclusion.