Lionel Messi wants to finish his career at Barcelona after signing a new deal that commits him through to the summer of 2021.
A renewal was agreed between player and club in July but it is only now that Messi has put pen to paper on the contract.
Announcing the deal, the LaLiga club added that the Argentina forward has had a €700million buy-out clause inserted into his contract.
That means the 30-year-old is likely to end his playing days at the Nou Camp and not, as has been reported for some time, move to Manchester City.
"I am happy. We've been waiting for some time to complete the signing and it was done today," Messi told the club's official website.
"I'm happy to continue with the club which is my home, and I'm happy to continue here to spend my entire life, my home, which is where I always wanted to have my career.
"My dream was to finish my career at Barca and we are moving down that path."
Messi, who made his senior debut as a 16-year-old in a friendly against Porto, has eight LaLiga titles, four Champions League wins and five Copa del Rey successes among his list of honours with the Catalan giants.
He is regarded by some as the greatest player of all time and the signing of his new deal means his Barcelona dynasty can continue apace.
Messi arrived at Barcelona from Newell's Old Boys as a teenager in 2000 and made his first competitive appearance against Espanyol as a 17-year-old.
He scored the first of his club record 523 goals - they have come in just 602 matches - against Albacete in May 2005 and has since claimed the Ballon d'Or on five occasions, more than any other player.
On Friday, he was presented with his fourth Golden Shoe award for being the top scorer in Europe, while his 30 titles put him alongside team-mate Andres Iniesta as having the most success in club history.
"The objective is to continue to continue achieving things, fill the club's trophy cases, and keep making history at Barca," Messi said in a video on the club's Twitter page.
"We've been lucky enough to have won a great many things and I hope there will be more in the future."
Club president Josep Maria Bartomeu said: "Leo wants to keep playing at Barca, he wants to finish his career here.
"And there is a lot of excitement for the coming years. Not just for him but also for the rest of the team."