Lionel Messi has agreed a new deal to commit his future to Barcelona until the summer of 2021. The Catalans have failed to disclose the details of the agreement but reports in Spain claim that the club have set his new release clause at €300m (£264m, $340m) following months of speculation linking the five-time Ballon d'Or with a potential move away from the Nou Camp.

While Barcelona have not confirmed any details, it has been reported that the new deal will see Messi become the highest paid footballer in La Liga ahead of Real Madrid star Cristiano Ronaldo and his teammate Neymar.

"FC Barcelona and Leo Messi have agreed on a contract renewal that will keep the Argentinian at the club until June 30th, 2021," a statement from the club confirmed. "The deal will be signed in the coming weeks, when Messi returns to the team for pre-season 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 Barça and has led the team to an era of extraordinary success, the likes of which has never been seen in world football."

The 30-year-old star scored 54 goals in 52 appearances for Barcelona during the 2016-2017 campaign but his long-term future at the La Liga giants has been under scrutiny amid delays in negotiations over a new deal.

The Argentina international was going to be out of contract at the end of the coming season and varying reports suggested that the likes of Manchester City could tempt him with a big bonus to try and get him to join them for free in the summer of 2018.

However, Barcelona officials have tried to play down that speculation in recent months, suggesting that the agreement was only a formality.

Lionel Messi
Messi scored 54 goals for Barcelona during the 2016-2017 campaign. Reuters

On 1 June, Ernesto Valverde himself was very optimistic about the situation while speaking during his presentation as new Barcelona manager, saying that he was looking forward to a "once in a lifetime experience" of working with the best player he has ever seen.

"I am not concerned. The information I have is that everyone is very optimistic about it," Valverde said. "I am lucky to be able to coach him. He's the best player I've ever seen on a pitch and it will be a once-in-a-lifetime experience. When you think that Messi has reached his peak, the next day he surprises you. I hope to enjoy his football and help him to improve, if that's possible."

Barcelona have now confirmed the good news days after Messi got married in Argentina to Antonella Roccuzzo.

The news is a much needed boost for Valverde ahead of his tenure at the Nou Camp amid the club's delays in securing his main summer targets. The Catalans have already completed the signings of Marlon Santos and Gerard Deulofeu but are struggling to convince Paris Saint-Germain and Arsenal to cash in on Marco Verratti and Hector Bellerin.

Neymar, Luis Suarez, Sergio Busquets, Javier Mascherano, Marc Andre Ter Stegen and Ivan Rakitic have also inked new deals at Barcelona in recent months as the Catalans keep planning for the future. However, captain Andres Iniesta is yet to follow in the same footsteps with only one year remaining in his current contract.