LOS ANGELES — Robert Pattinson is officially the new Batman.

Warner Bros. has closed a deal for the "Twilight" actor to play the Caped Crusader in "The Batman."

Matt Reeves' upcoming superhero tentpole hits theaters on June 25, 2021. Variety first reported on May 16 that Pattinson was in negotiations for the part. The studio confirmed on Friday that Pattinson had signed a deal.

Pre-production on the Warner Bros.-DC Comics pic is expected to start this summer.

Reeves, the filmmaker behind the last two "Planet of the Apes" sequels, assumed "The Batman" directing duties from Ben Affleck in January 2017. Reeves will produce "The Batman" with his "Planet of the Apes" collaborator Dylan Clark.

Affleck starred as Batman in the two titles directed by Zack Snyder: 2016's "Batman V. Superman" and 2017's "Justice League." Both films received mixed reviews and were viewed as somewhat disappointing for Warner Bros. in its efforts to compete with Marvel Studios in the superhero realm.

Pattinson, 33, became a star with the breakout success of the five-film "Twilight" franchise, in which he played the vampire Edward Cullen opposite Kristen Stewart's Bella. No official start date has been set for filming "The Batman."

Pattinson is starring with John David Washington in Christopher Nolan's event movie "Tenet," set to open July 17, 2020. He stars in "The Lighthouse," which premiered at the Cannes Film Festival and will be see in Claire Denis' "High Life," "The King" for Netflix and "Waiting for the Barbarians."

He is repped by WME, the Curtis Brown Group, and 3 Arts Entertainment.