Mr. Silverman and Kevin Tsujihara, then the studio’s chairman, were stunned. It had been widely reported at the time of the Aurora massacre that the gunman, whose hair was dyed reddish orange, had told the police that he was the Joker. That account was later debunked, but the character was still associated with the episode in the public consciousness. How did Mr. Phillips possibly expect the studio to buy into his idea? Warner Bros., after all, sold Joker pajamas at Walmart.

But they gave him permission to proceed with a script. The discussion with Mr. Phillips came as Warner Bros., once the dominant studio in Hollywood, had begun to sputter. Trying to compete with Disney with films like “Pan” was proving disastrous. Marvel was soaring by using a lighthearted formula while Warner Bros. had seemed to lose its superhero touch, most recently delivering the critically reviled “Batman v. Superman: Dawn of Justice.” The rise of Netflix, and the overreliance by studios on bloated sequels and reboots, were starting to keep ticket buyers on their living room sofas.

In the past, some of Warner’s most lasting hits came by leaning into risk and producing films that wowed audiences while saying something sharp about the broader culture. Warner Bros. was the studio that made “Natural Born Killers” (1994), about the media’s egging on a couple on a murderous spree, and had backed “A Clockwork Orange,” Stanley Kubrick’s 1971 movie about violent young sociopaths. Maybe part of the way forward for Warner Bros. was to embrace its rabble-rousing past.

“Original visions, strange visions — that’s why a lot of us fell in love with the movies in the ’70s,” said Marty Kaplan, the Norman Lear professor of entertainment, media and society at the University of Southern California. “There’s starting to be a bit of a return to that as some of the studios look for different, noticeable, sharp. Who has a bold take on the world that speaks to the part of our psyche that we ourselves don’t understand?”

Warner Bros. agreed in March 2018 to make “Joker,” with the studio’s new marketing chief, Blair Rich, emerging as a vocal proponent and Toby Emmerich, the new chairman of the movie division, judging the script as too good to pass up, according to four people involved in the project, who spoke on the condition of anonymity to maintain relationships.