Barcelona forward Lionel Messi said he had moved closer to his "dream" of "finishing my career at home" after signing a new contract, with the buyout clause raised to 700m euros (£626m).
Messi's new deal will expire after the 2020-21 campaign. The 30-year-old had one year remaining on his old contract.
The Argentine international, a five time Ballon d'Or winner, has scored 523 goals in 602 appearances for Barca.
"The objective is to continue achieving things and making history," he said.
Since joining at the age of 13, Messi has helped Barca win eight Spanish league titles and the Champions League four times.
"We've been lucky enough to have won a great many things and I hope there will be more in the future," he added.
"I'm happy to continue with the club, which is my home. My dream was to finish my career at Barca and we are moving down that path."
Barca announced in July that Messi had agreed a new deal, after he had reportedly rejected an initial offer in May.
Club president Josep Maria Bartomeu described him as "the best player in football history", and said the new contract, with a significantly higher buyout clause, was "more in line with the current situation in the ever-changing world of football".
He added: "The buyout clause had to be modified, and it has gone from 300m euros to 700m euros.
"It fills me with pride to see him with us renewing his love for the club."
Messi was presented with his fourth European Golden Shoe on Friday - the award given to the highest scorer in European club football - after finding the net 37 times in La Liga last season.
Messi in numbers
- 4,788 - Days since Barcelona debut
- 361 - Record goal tally in La Liga
- 40 -Career hat-tricks; 36 for Barcelona, four for Argentina.
- 30 - Trophies with the club
- 8 - La Liga titles
- 4 - Champions League wins
Messi facts you might not have known
- the non-Spanish player with the most appearances for Barcelona (602)
- the all-time La Liga top-scorer (361 goals)
- the player with the most goals scored for the same club in the Champions League (97)
- the record holder for the most goals in a single La Liga season, having scored 50 in 2011-12
- the player to have scored in the most consecutive games in La Liga, doing so in 21 matches in a row in 2012-13
- the all-time top-scorer in El Clasico history (24)
- the third Barcelona player to reach 600 appearances in all competitions