Spanish goalkeeper David de Gea said “it’s the right time to undertake a new challenge” as he confirmed he is leaving Manchester United this summer.
The 32-year-old was a free agent after his contract at the Old Trafford club ran out at the end of June.
De Gea has been at United for 12 years and his 545 appearances and 190 clean sheets are club records for a keeper.
“I just wanted to send this farewell message to all Manchester United supporters,” he wrote on social media.
De Gea started his career at Atletico Madrid but joined United for £18.9m in 2011.
The announcement of his departure comes with United manager Erik ten Hag’s side hopeful of concluding a deal for Inter Milan goalkeeper Andre Onana.
De Gea added: “I would like to express my unwavering gratitude and appreciation for the love from the last 12 years. We’ve achieved a lot since my dear Sir Alex Ferguson brought me to this club.
“I took incredible pride every time I pulled on this shirt, to lead the team, to represent this institution, the biggest club in the world was an honour only bestows upon a few lucky footballers.
“It’s been an unforgettable and successful period since I came here. I didn’t think from leaving Madrid as a young boy we would achieve what we did together.
“Now, it’s the right time to undertake a new challenge, to push myself again in new surroundings.
“Manchester will always be in my heart, Manchester has shaped me and will never leave me.”
It is understood the framework of a contract extension that had initially been agreed between United and De Gea was subsequently changed.
That led to both sides stepping back to reflect on the situation, and now this outcome.
De Gea, who has been linked with a move to the Saudi Pro League, won the Premier League, FA Cup, Uefa Europa League and two Carabao Cups while at United.
He is a four-time United player of the year winner and claimed the Premier League Golden Glove for a second time last season as he kept 17 clean sheets.
“To have won player of the year awards from both the fans and his team-mates, each on four occasions, shows the level of his performance and he will always be remembered as one of the very best goalkeepers in the history of the club,” said Ten Hag.
Simon Stone, BBC Sport
This news should not be viewed as meaning a deal for Inter Milan’s Onana is imminent.
United have held positive initial discussions regarding the Cameroon international and are hopeful of a resolution.
However, a compromise will be needed on the price, with Ten Hag needing to determine his order of priorities given an obvious pressing need for a central striker.
Sources confirm negotiations with De Gea extended over several months, with United adamant no contract was ever formally offered to the former Spain international.
Since the end of the season, both sides have eventually decided the time is right to sever ties.
It leaves Dean Henderson and Tom Heaton as United’s experienced goalkeeping options, with the latter likely to be in goal for Wednesday’s opening pre-season game against Leeds in Oslo.