Mads Mikkelsen will replace Johnny Depp as the villainous dark wizard Gellert Grindelwald in the third "Fantastic Beasts" movie, Warner Bros. Pictures has announced in a statement.

Danish actor Mikkelsen, who has recently appeared in "Rogue One: A Star Wars Story," "Hannibal," and "Casino Royale," will play the dark wizard at the center of the action in the "Harry Potter" prequels.

The movie, due for release on July 15, 2022, is currently in production at Warner Bros. Studios Leavesden, near London.

It also features Eddie Redmayne, Katherine Waterston, Dan Fogler and Ezra Miller among many others.

Depp debuted as Grindelwald at the end of the first "Fantastic Beasts" movie, but played a much larger part in the second installment, which charts the wizard's rise.

On November 6, Depp wrote in a statement posted on Instagram that he had been asked by Warner Bros. to resign from the role.

A spokesperson for Warner Bros., which like CNN is owned by WarnerMedia, confirmed the news.

Earlier in the month, Depp lost a libel suit against the publisher of Britain's The Sun newspaper over the publication's claims that he was an abusive husband.

Depp referenced the decision in a statement announcing his departure and said he plans to continue his legal fight.

The first two "Fantastic Beast" films were released in 2016 and 2018, respectively, and there will be five in total, according to creator JK Rowling.