Johnny Depp has left the Fantastic Beasts film franchise, days after losing a libel case over a newspaper article which called him a wife beater.
In a letter to fans, Depp said he had been "asked to resign" from his role as Gellert Grindelwald and had "respected that and agreed to that request".
He called the libel judgement "surreal" and confirmed his plans to appeal.
Film studio Warner Bros confirmed Depp's departure and said his role would be recast.
"We thank Johnny for his work on the films to date," it said in a statement.
Depp, 57, had sued the publisher of The Sun newspaper over a 2018 article, which claimed he assaulted his ex-wife Amber Heard.
Earlier this week, Judge Mr Justice Nicol ruled The Sun had proved the article to be "substantially true".
In his letter, posted on Instagram, Depp said the judgement would not "change my fight to tell the truth".
Johnny Depp statement in full
In light of recent events, I would like to make the following short statement.
Firstly I'd like to thank everybody who has gifted me with their support and loyalty. I have been humbled and moved by your many messages of love and concern, particularly over the last few days.
Secondly, I wish to let you know that I have been asked to resign by Warner Bros. from my role as Grindelwald in Fantastic Beasts and I have respected that and agreed to that request.
Finally I wish to say this, The surreal judgement of the court in the UK will not change my fight to tell the truth and I confirm that I plan to appeal.
My resolve remains strong and I intend to prove that the allegations against me are false. My life and career will not be defined by this moment in time.
Thank you for reading. Sincerely, Johnny Depp
Depp made a brief appearance as Grindelwald in 2016's Fantastic Beasts and Where to Find Them and reprised his role in 2018's Fantastic Beasts: The Crimes of Grindelwald.
The films are prequels to the eight Harry Potter films, which were based on the novels by JK Rowling.
According to Warner Bros, the third film in the series is currently in production and will be released in summer 2022.
Monday's judgement followed a trial that was heard over 16 days in July at the Royal Courts of Justice in London.
The trial contained allegations of violence that spanned the period between 2013 and 2016, when Depp and Heard split up.
In his ruling, Judge Nicol found that 12 of the 14 alleged incidents of domestic violence had occurred.
Mr Depp is suing Ms Heard, 34, in the US in a separate case, over an opinion piece she wrote in the Washington Post.