An emotional Lionel Messi said joining Paris St-Germain was "a possibility, but nothing is agreed" as he confirmed his exit from Barcelona.
The record six-time Ballon d'Or winner, 34, is now a free agent.
"My family and I were convinced we were going to stay here, at home," he said during a news conference on Sunday.
"This is the end with this club and now a new story will begin," added the Argentina forward. "Yes, it's one of the most difficult moments for me.
"I don't want to leave this club - it's a club I love and this is a moment I didn't expect."Last year I wanted to leave, this year I wanted to stay. That's why I'm so sad.
"It was like my blood ran cold. I was really sad. It was really difficult right up to now. I'm still trying to process it all.
"When I get home I will still feel bad; it will be even worse. I'm not ready for this."
What else did Messi say?
Lionel Messi won 34 trophies with Barcelona after making his first-team debut aged 17 in October 2004Messi, Barcelona's record goalscorer, submitted a transfer request last summer before agreeing to stay for the final year of his contract.
That expired on 1 July and Messi is now in talks over a move to PSG, where he would play alongside Kylian Mbappe and former Barca team-mate Neymar.
"It is a possibility, but I have not agreed anything with anyone," he said. "I have got different clubs interested. Nothing is definitive but clearly we are talking to them."
Messi left Argentina for Spain when he was 13 and made his first-team debut for Barcelona aged 17 in October 2004.
He went on to score 672 goals in 778 games and helped the Spanish giants win 34 trophies, replicas of which were displayed at his news conference at the Nou Camp.
"I'm so grateful for the love that everyone's shown me, for all my team-mates, and the club being by my side," he said. "Today I have to say goodbye to all this.
"I arrived when I was very young, 13 years old, and after 21 years I am leaving with my wife and three Catalan-Argentine children.
"I cannot be more proud of everything I did and lived in this city. I have no doubt that, after a few years away, we will return because it is our home."
Messi added: "I'm leaving the club without seeing the fans for over a year and a half [due to the pandemic]. If I imagined it, I would imagine the Camp Nou full, and to say goodbye properly. But it has to be this way."
Why is Messi leaving Barcelona?
Messi looked set to extend his stay at the Nou Camp having agreed a new five-year contract in July, halving the £123m a season he reportedly received in his previous contract.
The agreement was dependent on player departures to get Barca's wage bill under La Liga's limit, however, and the club were unable to do so.
"I offered to reduce my salary by 50% and they didn't ask me for anything else," Messi said. "It is not true that they asked me for anything more.
"I only know that it was not possible because of La Liga, because the club did not want to go into more debt."
Barcelona president Joan Laporta said on Friday that trying to keep Messi could have put the club at risk for 50 years.
Once it became clear Barca were unable to honour the contract they had agreed with Messi, his representatives contacted PSG, but wherever Messi goes next, he said he wants to "play my last years competing for titles".
He also had a warning for his former Barca team-mate Dani Alves after the 38-year-old right-back helped Brazil win Olympic gold to extend his record for career titles to 43.
"I congratulate Dani Alves and warn him that I am going to fight to catch up with him and surpass him," Messi added. "It's my mentality. I have to find my way to keep competing and winning."
'Imagining the club without you is difficult'
Hundreds of fans were at the Nou Camp and his family were on the front row at the news conference, with Messi's wife Antonella handing him a tissueHundreds of fans gathered outside the Nou Camp and several of Barcelona's first-team players were also in attendance.
Messi was in tears as he walked on to the stage and he received a round of applause before, during and after his news conference.
Andres Iniesta, who won the Champions League four times with Messi, tweeted: "We shared magical moments and always stayed together. Imagining the club without you or being able to see you at the Camp Nou with another shirt is difficult."
Xavi Hernandez, another member of that legendary Barca midfield, added: "I can only thank you for everything you have given us during these years. Whatever you do, I wish you the best."
Current Barca captain Gerard Pique said: "Nothing will ever be the same again. Not the Camp Nou, not the city of Barcelona, not ourselves. The reality, sometimes, is very harsh."
Lionel Messi's transfer timeline
25 August 2020 - Messi sends a fax to the club saying he wishes to exercise a clause in his contract, allowing him to leave for free with immediate effect.
4 September 2020 - Messi says he is staying at Barcelona because it is "impossible" for any team to pay his 700m euro (£624m) release clause, which the club insist would have to be met.
27 October 2020 - Barcelona president Josep Maria Bartomeu, who had fallen out with Messi over his failed transfer request, resigns.
28 December 2020 - Messi says he hopes to one day play in the United States, but is unsure of his future when his contract runs out.
31 January 2021 - Barcelona say they will take "appropriate legal action" against Spanish newspaper El Mundo after it published details of Messi's contract, worth £492m over four years.
16 May 2021 - Manager Ronald Koeman says he hopes Messi has not played his final home game for the club after a 2-1 defeat by Celta Vigo ended their title hopes and meant they finished outside the top two for the first time since 2007-08.
22 May 2021 - Paris St-Germain are believed to be "looking closely" at Messi's contract situation.
28 May 2021 - Barcelona president Joan Laporta says a new contract for Lionel Messi is "not done yet" but that "things are going well".
1 July 2021 - Messi's Barcelona contract expires and he becomes a free agent.
15 July 2021 - Messi agrees to stay with Barca on a deal until 2026 that includes reducing his wages.
5 August 2021 - Barcelona announce Messi will leave the club "because of financial and structural obstacles".