Barcelona – Lionel Messi ended months of speculation when finally putting pen to paper on Saturday to extend his contract with Barcelona until 2021, the club announced, making official an agreement reached in July.
Barca had announced in the summer that Messi, 30, had committed his future to the club but the Argentine had not signed the new deal.
With his previous contract set to expire in 2018, Messi could have left Barca for free next summer had he not extended his deal.
"FC Barcelona and Lionel Messi signed on Saturday morning a new contract that will keep the Argentinian superstar at the club through the 2020/21 season," read a club statement.
"The buyout clause was set at €700 million."
The steep rise in the five-time World Player of the Year's buyout clause is designed to avoid any repeat of Paris Saint-Germain's capture of Neymar from Barcelona by paying the Brazilian's €222 million buyout clause in August.
Barca first announced an agreement with Messi back on July 5, but pressure has been mounting on beleaguered club president Josep Maria Bartomeu to get Messi to put pen to paper after a turbulent summer for the Catalans.
Neymar's departure sparked an institutional crisis and Bartomeu was heavily criticised for failing to ward off PSG with a higher buyout clause and a haphazard search for replacements in the final weeks of the transfer window.
Bartomeu did though manage to see off a vote of no confidence measure launched by disgruntled fans thanks to Barca's fantastic start to the season, in large part inspired by Messi's form.
Bartomeu had previously claimed the deal was all "agreed and signed" via Messi's father and agent Jorge Horacio Messi.
Yet, to eradicate any doubts, Bartomeu now also has the image he craved of a smiling Messi tying the remainder of his peak years to the club.
Messi's 30 trophies are, along with teammate Andres Iniesta, the most in Barca's history, including eight La Liga and four Champions League titles.
The diminutive Argentine, who joined Barca at the age of 13, has also smashed 523 goals in 602 games to become the Catalans' all-time top goalscorer.
"Obviously, a lot of time has passed and a lot of things have happened, both on and off the pitch since then, but the excitement and desire remains the same," Messi told Spanish sports daily Marca on Saturday, a day after picking up his fourth golden boot as the top goalscorer in Europe last season.
News of Messi's renewal also comes as a huge boost to the leaders of La Liga ahead of Sunday's top-of-the-table clash at Valencia (21:45 SA time).
Barca lead a revitalised Valencia by four points, with both Real Madrid and Atletico Madrid a further six points adrift, thanks to a club record start of 11 wins and one draw from 12 games.
Despite leaving Messi on the bench, Barca also sealed their place in the last 16 of the Champions League with a 0-0 draw at Juventus on Wednesday.