Zlatan Ibrahimovic confirmed on Friday that he will leave Paris Saint-Germain at the end of this season, but the French champions said the Swedish star will eventually return in a "management" role.
"My last game tomorrow at Parc des Princes. I came like a king, left like a legend," wrote Ibrahimovic on Twitter, ending speculation that he could extend his contract with PSG beyond this season.
Ibrahimovic, whose existing deal expires on June 30, will make his final home appearance for the club in their last Ligue 1 game of the season against Nantes on Saturday.
However, he will then run out in a PSG shirt one more time when they face Marseille in the French Cup final on May 21 at the Stade de France.
"After discussions between Paris Saint-Germain and the agent of Zlatan Ibrahimovic, the club and the player have mutually decided not to renew his contract," PSG said.
"They have also agreed that once his playing career is over, Ibra will join the management of the club in a position of responsibility."
In the meantime, Ibrahimovic will make his French swansong as a player when he turns out for Sweden at Euro 2016 in June.
There has been widespread speculation about the 34-year-old former Ajax, Juventus, Inter Milan, Barcelona and AC Milan star's next destination.
He has been linked with a move to the English Premier League, while his agent recently suggested he could return to AC Milan and Major League Soccer is another potential destination.
One report in Italy earlier on Friday said he was "90 percent" likely to continue his career with LA Galaxy.
Ibrahimovic, who last weekend was crowned France's player of the year for a record third time, has enjoyed enormous domestic success with PSG since moving to the French capital from Milan in 2012, winning the Ligue 1 title in each of his four seasons.
If Paris win the French Cup next week, they will have completed a clean sweep of the domestic honours for the second year running and Ibrahimovic will have won 12 trophies with the club.
"I am very proud of the last four years. I have loved every day I have spent here," Ibrahimovic said.
"PSG has become a star club internationally and I have played a major part in that transformation.
"The time has now come for me to take a different path.
"This is not a farewell but simply a goodbye for now. I came here like a king and leave as a legend. But I will come back!"
- Record goal-scorer -
Ibrahimovic scored his 36th league goal of the season in Wednesday's 1-1 draw at Bordeaux, leaving him just one away from equalling Argentine striker Carlos Bianchi's club record of 37 in a top-flight campaign, set back in 1978.
He has 46 in all competitions and has 152 goals in total as a PSG player in 178 appearances, having overtaken Portuguese great Pauleta as the club's all-time leading scorer back in October.
Ibrahimovic has also become the club's all-time leading scorer in the league and in Europe, but he never really managed to reproduce his brilliant domestic form in the Champions League.
The Swede performed poorly in PSG's quarter-final exit to Manchester City last month, missing a penalty in the 2-2 first-leg draw at the Parc des Princes before Paris went out 3-2 on aggregate.
In Paris speculation will now turn to who PSG will sign to replace their talisman.
They have in the past been linked with moves for Real Madrid and Portugal superstar Cristiano Ronaldo and Barcelona's Brazil forward Neymar.
However, moves for these two players would be extremely complex and costly, and a report in sports daily L'Equipe on Friday indicated that the Qatar-owned club will instead turn their attentions to Antoine Griezmann.
The Atletico Madrid striker, who on Thursday was named in France's Euro 2016 squad, would cost in the region of 70 million euros (£55.1m, $79.5m), L'Equipe said.
(For more sports news and updates, follow Ahram Online Sports on Twitter at @AO_Sports and on Facebook at AhramOnlineSports.)