Jude Law is going from playing a young pope to a young Dumbledore.

The two-time Oscar nominee has been cast in the sequel to Fantastic Beasts and Where to Find Them playing the beloved Harry Potter headmaster.

In the new movie, “Law will portray Dumbledore long before the iconic wizard became the Headmaster at Hogwarts, as he has been known in the Harry Potter books and movies. We meet him decades earlier when Dumbledore is still serving as the wizarding school’s Transfiguration professor. He is also a contemporary of Gellert Grindelwald, the charismatic dark wizard who believes wizards are superior to Muggles and No-Majs.”

Image zoom

The script by J.K. Rowling is said to “move deeper into an increasingly dark time for the wizarding world, where Newt Scamander and our other heroes have to decide on their allegiances.”

Director David Yates put out this statement: “Jude Law is a phenomenally talented actor whose work I have long admired, and I’m looking forward to finally having the opportunity to work with him. I know he will brilliantly capture all the unexpected facets of Albus Dumbledore as J.K. Rowling reveals this very different time in his life.”

Shooting begins this summer on the sequel to last fall’s film, which earned more than $813 million at the global box office. The as-yet-untitled Fantastic Beasts sequel is slated for release on Nov. 16, 2018.

The cast, including Eddie Redmayne as Newt Scamander, is expected to return for the next installment — as is Johnny Depp. The Pirates of the Caribbean star made a brief appearance at the end of the first film as dark wizard Grindelwald, though his casting was quite controversial among fans when it was revealed last year.