PHOTOS: Ben Affleck and 10 Actors Who've Played Multiple Comic Characters

It's unclear when exactly these talks began. Multiple sources say the studio approached other actors as well, including Josh Brolin. Ryan Gosling was also a possibility, but the actor dislikes the idea of sequels.

But Affleck was curious, and initial talks focusing on story and character began. Once Affleck was satisfied, WME's Patrick Whitesell and Ziffren Brittenham's Sam Fischer began negotiating his role in the Superman sequel. Sources say that Affleck has been signed for multiple movies, should sequels continue to proliferate. The talks were so secretive that many Warners execs and most WME agents remained unaware of their existence.

The high-profile choice left fans stunned. Thousands signed petitions for Warner Bros. to remove Affleck from the role, and a social media sentiment analysis firm estimated that 71 percent of tweets about the news in the first hour were negative. But years ago fans attacked Heath Ledger after he was cast as The Joker, and, in pre-Internet times, Michael Keaton when he landed the lead in Tim Burton's Batman. (Or, let's not forget, Jon Favreau's in-hindsight-perfect choice of Robert Downey Jr. as Iron Man.)

STORY: Ben Affleck as Batman: Internet's 10 Best Memes

On one level, Affleck’s return to superheroes seems bewildering. The Oscar-winning co-writer of Good Will Hunting drew scorn after donning the red suit for Daredevil, and later agreed it wasn't his best work. After he'd recovered and turned in a bravura performance directing and starring in The Town, Fox offered him the chance to direct and star in a Daredevil reboot -- but Affleck turned it down.

More recently, Nolan offered Affleck the chance to direct Man of Steel. Affleck declined, seemingly because of a desire not to return to the world of capes -- despite being an avowed comic book fan.

But it turns out Warner Bros. had other plans. And indeed, the film acts as a canny show of force by the studio, which, with one announcement, publicly threw its support behind one of its signature stars. Warners just showed Hollywood that it's still very much in the Ben Affleck business, a necessary move after his Argo took home the best picture Oscar, and after Kevin Tsujihara's ouster of Affleck champion Jeff Robinov left many of the studio’s go-to talents uneasy.

PHOTOS: Batman Through the Years

Putting one of the studio's signature stars in one of its signature franchises assuages those concerns and potentially keeps key figures in the fold, an important strategic move after the departure of not only Robinov but financier Legendary, a production partner with a talent-friendly reputation that's now financing films across town at Universal.

The closely watched sequel also gets a handy bolstering of star power. While Cavill didn't hurt Man of Steel's $649 million global box office while getting generally favorable reviews as Superman, he's seen as an actor on the rise -- not one who's able to open or carry a tentpole franchise on his back. The first movie benefited from strong work by Kevin Costner and Russell Crowe, but (spoiler alert!) both their characters died in the movie and are unlikely to return.

Affleck's presence also hedges the movie against Nolan’s greatly lessened involvement. Nolan was heavily involved in Man of Steel's story and postproduction, and was instrumental in the studio's choice of Snyder as a director. But he's busy in Canada shooting Interstellar, his sci-fi adventure movie. Affleck has also demonstrated Oscar-caliber chops as a director and writer, which should prove handy on Snyder's set.

But here's the big reason it makes sense: Affleck gets to be a tentpole actor again without the tentpole actor risk. After a run of big movies that cast his tentpole future in doubt (Paycheck, Surviving Christmas, Daredevil -- no offense, sir). Affleck reinvented himself as a smaller-scale filmmaker, and proved his ability to direct himself along the way. And while he's recently nabbed the prestigious role of starring in Gone Girl, which paired him with the well-regarded David Fincher, the Batman role allows him free rein over one of the no-brainer success stories of July 2015. He will shoot Gone Girl opposite Rosamund Pike from September until February, then shift to Man of Steel 2 from February to August (while doing preproduction on Live By Night), then tackle that film, a Prohibition gangster movie, as writer-director-star next fall.

STORY: Christopher Nolan on Why Superman Is More Challenging Than Batman

Because it’s considered a sequel to Man of Steel and not a Batman movie, any potential underperformance issues won't ultimately land on his shoulders.

(That’s not to say there is no risk. Anyone stepping into the character’s boots has the tough task of following Nolan's direction of Christian Bale. Affleck's trick is threading the needle between Bale's hoarse intensity and the campy mess Joel Schumacher made of George Clooney -- who keeps a photo of himself in the Batsuit in his Smoke House Productions office in mocking remembrance.)

The deal also potentially lines Affleck up to star in (and direct?) Warner Bros.' answer to The Avengers: The eventual Justice League movie.