Dwayne Johnson has been officially cast in DC's upcoming film Shazam, playing anti-hero Black Adam.

Johnson has been teasing his involvement in a superhero film for months, confirming last month that the film would be Shazam and that his role would either be the titular character or Black Adam, as we previously reported.

Now, Johnson's role in the movie is finally official, and he will be tackling the Black Adam role, according to Variety.

Black Adam is known for being Shazam's primary villain, though he's often seen by fans as being more of an antihero than a flat out villain. Johnson himself teased this in his tweet by using the hashtag "TheAntiHero."

Variety is also reporting that the film will be written by Darren Lemke, who also worked on recent films such as Shrek Forever After, Jack the Giant Slayer and Turbo. Lemke is also attached to work on the screenplay for the upcoming Goosebumps film.

Though Johnson has been hinting for some time about his involvement in Shazam, his role as a somewhat evil character comes as a surprise to many, especially given Johnson's career recently as a usually good action star, often in family friendly films like Journey 2 The Mysterious Island.

image courtesy of INFphoto.com