Pierce Brosnan is taking on his first role as a superhero. The actor has been cast as Dr. Fate in DC and New Line’s “Black Adam” alongside Dwayne Johnson, who is playing the titular role.

Dr. Fate, also known as Kent Nelson, is a founding member of the Justice Society who gains superpowers through putting on the magical Helmet of Fate. The casting of Brosnan completes the lineup for the Justice Society of America, with Aldis Hodge playing Hawkman, Noah Centineo as Atom Smasher and Quintessa Swindell taking on Cyclone.

“Black Adam” follows the story of the anti-hero of the same name, played by Johnson. The character of Black Adam first appeared in DC Comics in the 1940s as a power-corrupt villain, and slowly became an anti-hero by the 2000s, known for his disregard of rules and conventions.

“Black Adam” is directed by Jaume Collet-Serra, who also directed Johnson in Disney’s “Jungle Cruise.” Rory Haines and Sohrab Noshirvani wrote the latest draft of the script, with Adam Sztykiel writing the previous draft. Johnson, Dany Garcia and Hiram Garcia of Seven Bucks Productions are producing with Beau Flynn of FlynnPictureCo. FlynnPictureCo’s Scott Sheldon will serve as executive producer.

Brosnan is known for a myriad of roles, including James Bond in four of the franchise’s films, the “Mamma Mia!” films, “The Matador” and “The Ghost Writer.” He most recently starred in Will Ferrell’s “Eurovision Song Contest: The Story of Fire Saga,” and can be seen in the upcoming film adaptation of “Cinderella” in July.

Brosnan is repped by CAA, Curtis Brown, Hansen, Jacobson, Teller, Hoberman, Newman, Warren, Richman, Rush, Kaller & Gellman and Viewpoint.