Zlatan Ibrahimovic has left Manchester United with immediate effect after his contract with the club was terminated by mutual consent.

The Red Devils made the announcement Thursday and it brings to an end the Swede’s two-year spell at the Old Trafford club. Ibrahimovic joined United from Paris Saint-Germain on a free transfer in 2016.

"Manchester United confirms that it has agreed to the termination of Zlatan Ibrahimovic’s contract with immediate effect,” a statement read on the Premier League side’s official site. “Everyone at the club would like to thank Zlatan for his contribution to the team since his arrival and wishes him well for the future."

Ibrahimovic was a mainstay in Jose Mourinho’s team in his first season at the club, making a total of 46 appearances in all competitions. He was United’s top scorer with 28 goals as he led the club to three trophies — the Community Shield, the EFL Cup and the Europa League, making it a successful first season for the Portuguese manager.

The former Sweden international suffered a severe knee injury in the latter stages of the 2016-17 season, which resulted in him spending eight months out of action. The injury required him to go under the knife, which led to a lengthy layoff.

United released Ibrahimovic at the end of last season, but re-signed him on a new contract during last summer’s transfer window. He returned to action in November 2017 as a second-half substitute against FC Basel in the Champions League.

The 36-year-old managed just seven appearances in all competitions before he was struck down by a recurrence of the knee injury that kept him out for eight months on Boxing Day during a Premier League clash against Burnley. The match against the Clarets has now become Ibrahimovic’s last appearance for the United and the striker thanked everyone at the club while stating “great things also come to an end.”

“Great things also come to an end and it is time to move on after two fantastic seasons with Manchester United. Thank you to the club, the fans, the team, the coach, the staff and everybody who shared with me this part of my history,” Ibrahimovic wrote on his official Instagram page alongside a picture of him arm wrestling the devil.

Ibrahimovic has already decided on his next move with ESPN reporting the Swedish forward has agreed a deal to join Major League Soccer (MLS) outfit LA Galaxy. He is expected to have signed a deal until the end of the 2019 season and will earn $3m during his stay with the club, which will come from the targeted allocation money.  

The former Barcelona and Inter Milan striker will not be a designated player with Galaxy already using up their three slots for highly paid players on Giovani dos Santos, Jonathan dos Santos and Romain Alessandrini. The report claimed Ibrahimovic could make his debut March 31 when Galaxy take on MLS expansion team LA FC.