BARCELONA, Spain (AP) -- Lionel Messi has told Barcelona he wants to leave the club after nearly two decades with the Spanish giants.
The club confirmed to The Associated Press on Tuesday that the Argentina great sent a document expressing his desire to leave.
The announcement comes 11 days after Barcelona's humiliating 8-2 loss to Bayern Munich in the Champions League quarterfinals, one of the worst defeats in the player's career and in the club's history.
The defeat capped a difficult season for Barcelona -- the first without a title since 2007-08 -- and ignited one of its worst crises ever.
The 33-year-old Messi has won a record six Ballon d'Or awards during his time at Barcelona as the top player in the world, and has helped the club win 10 Spanish league titles and four Champions League crowns.
However, his attempt to exit the club could now lead to a legal battle between the two sides over a clause in his contract.
Barcelona said the document sent by Messi referenced a clause allowing him to leave for free at the end of the season. However, the club said the deadline for triggering that clause expired in June and that it would seek legal advice.
The Spanish season would normally have ended in May but was pushed back because of the coronavirus pandemic.
If Messi can leave for free, he will have no shortage of suitors. However, only a handful of clubs could realistically afford to pay his wages even without a transfer fee -- with mega-rich Paris Saint-Germain and Manchester City widely seen as perhaps the most likely destinations.
Messi had been outspoken about his dissatisfaction with some of Barcelona's decisions this season. He had been silent since the loss to Bayern, though, raising doubts about his future.
Club president Josep Bartomeu had said he was confident that Messi would finish his career with Barcelona, and that he was a crucial part of incoming coach Ronald Koeman's plans for the team.
Koeman met with Messi last week and the player reportedly told the Dutchman that he saw himself more out than in at the club at that moment.