Nov. 6 (UPI) -- Johnny Depp is exiting Warner Bros.' Fantastic Beasts film franchise.
The 57-year-old actor said Friday on Instagram that he was asked to resign from the series.
Depp played Gellert Grindelwald in Fantastic Beasts and Where to Find Them (2016) and Fantastic Beasts: The Crimes of Grindelwald (2018). He was to reprise the role in a third film.
Depp's exit comes days after the actor lost his libel case against The Sun. The British tabloid published a story in 2018 that called Depp a "wife beater" and alleged he was abusive to his ex-wife, Amber Heard.
A U.K. judge ruled Monday that The Sun's use of the phrase was justified and that the paper's allegations were "substantially true."
Depp addressed the ruling in his statement about Fantastic Beasts.
"Firstly, I'd like to thank everybody who has gifted me with their support and loyalty," the star said. "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 and agreed to that request," he added.
Depp said he plans to appeal the court's ruling in his libel case.
"The surreal judgement of the court in the U.K. will not change my fight to tell the truth and I confirm that I plan to appeal," the actor said.
"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," he concluded.
Warner Bros. confirmed Depp's exit in a statement to Entertainment Weekly and said Grindelwald will be recast. The third film will now open in 2022.
"Johnny Depp will depart the Fantastic Beasts franchise. We thank Johnny for his work on the films to date. Fantastic Beasts 3 is currently in production, and the role of Gellert Grindelwald will be recast. The film will debut in theaters worldwide in the summer of 2022," the studio said.
Fantastic Beasts is inspired by J.K. Rowling's book Fantastic Beasts and Where to Find Them and takes place in the Harry Potter universe. The movies star Eddie Redmayne, Katherine Waterston and Ezra Miller.