Matt Reeves has closed a deal to direct “The Batman.”

Reeves took over the reins as director after Ben Affleck stepped aside to focus on starring as the Caped Crusader. Reeves will also produce the movie.

News broke last week that negotiations had collapsed, but that there was a strong possibility that they could resume. WB had offered Reeves the directing gig two weeks ago after Affleck exited the film.

Sources stressed last week that it was a priority for the studio to sign a helmer as soon as possible in order to move the pre-production forward.

“I have loved the Batman story since I was a child,” Reeves said. “He is such an iconic and compelling character, and one that resonates with me deeply. I am incredibly honored and excited to be working with Warner Bros. to bring an epic and emotional new take on the Caped Crusader to the big screen.”

Reeves, Affleck, and the studio can now focus on moving the film into production and begin casting. Sources indicate that Chris Terrio turned in a script that pleased both the studio and Affleck. A release date has not been set yet for the superhero tentpole.

This marks Reeves’ first comic book adaptation. The filmmaker helped launch the “Cloverfield” franchise and reinvent the “Planet of the Apes” series, with “War for the Planet of the Apes” bowing this summer.

Reeves is repped by CAA.