Barcelona have announced that Neymar has signed a new five-year contract with the club.
The Brazil captain's buyout clause has been fixed at €200 million for the first year of the deal, €222m for the second and €250m for the remaining three years.
Neymar's future had been the subject of much speculation over the past 12 months, with both the player's camp and the Barca board regularly saying a new deal was close but not done yet.
Amid such uncertainty there were rumours that Manchester United, Paris Saint-Germain and Real Madrid were keen to pay his previous €190m release clause, while legal issues around Neymar's 2013 arrival at the Camp Nou continued.
A recent pact between Barca and the Spanish tax authorities appeared to bring an agreement closer, and on Thursday Blaugrana president Josep Maria Bartomeu said that a new contract would be announced "today, tomorrow or very soon," with the player himself then tweeting that he was "very happy to continue living this dream."
On Friday, there was confirmation from the Catalan club's website that the deal had been signed and Neymar would visit Barcelona on July 15 for a formal presentation before he heads to the Olympics in Rio de Janeiro to represent Brazil.
- FC Barcelona (@FCBarcelona) July 1, 2016
Reports in Spain said that Neymar's new net salary will be €15m a year, well below the totals earned annually by teammate Lionel Messi and Real Madrid star Cristiano Ronaldo.
However, there was a public row in Brazil this week over whether his new salary might make him the world's highest-earning player.
Over three seasons with Barcelona, Neymar has scored 85 goals in 141 games and has won one Champions League title, two La Ligas, two Copa del Reys, one UEFA Super Cup, one Spanish Super Cup and one FIFA Club World Cup.