The biggest fight in Warner Bros.’ “Suicide Squad” didn’t take place on a film set — it was waged in the editing room at the studio between director David Ayer and the executives behind his $175 million super villain gamble, insiders told TheWrap.

Ayer envisioned the DC Comics adaptation as a dark story of bad guys weaponized by the U.S. government. But after a lackluster performance from the studio’s equally dark “Batman v Superman: Dawn of Justice” in March, top brass insisted on a “lighter take” for “Suicide Squad,” an individual close to the director said.

This meant there were additional shoots to insert humorous bits, and the production burned through editors who worked with Ayer to reach the final cut that satisfied the studio — and that fans will see in theaters on Friday, a second individual close the studio said of the changes.

Also Read: Does 'Suicide Squad' Have a Post-Credits Scene?

The pressure around the film was intense from the start — in part because Warner gave it a release date before it had a director or script, according to the insider. By June, the heat on the director was so intense that he left his CAA agent Todd Feldman and defected to rival William Morris Endeavor. His rep managed to bring him back into the fold within 24 hours.

“There was no blueprint for a movie full of villains. You don’t have the Batman or Superman legend here,” said the first individual.

But it was “Batman v Superman,” starring Ben Affleck and Henry Cavill, that put the squeeze on Ayer to make “Suicide Squad” a more fun movie experience. The first portion of the film, which constituted most of the reshoots, is a cheeky introduction to antiheroes Deadshot (Will Smith), Harley Quinn (Margot Robbie) and El Diablo (Jay Hernandez) in their jail cells. The villains are heckled by a wisecracking security guard in a high energy vignettes.

Also Read: 'Suicide Squad' Director Reacts to Bad Reviews

Critics and fans derided “BvS” as too self-serious and the film suffered the biggest second-week box office drop in recent memory.

Adding to the pressure for a lighter take was the unexpected success of 20th Century Fox’s “Deadpool,” a relatively inexpensive film about a super antihero, played by Ryan Reynolds, that earned a stunning $780 million worldwide.

Ayer is known to be brash — he yelled “Fuck Marvel!” at the “Suicide Squad” New York premiere on Monday, though he later apologized.

Warner Bros. and Ayer are now on good terms, according to the individuals who spoke to TheWrap. The director and studio said in a joint statement: “This was an amazing experience. We did a lot of experimentation and collaboration along the way. But we are both very proud of the result. This is a David Ayer film and Warners is proud to present it.”

Also Read: 'Suicide Squad' Fans Petition to Shut Down Rotten Tomatoes Over Bad Reviews

Still, Warners did not scoop up Ayer’s next project, the supernatural police thriller “Bright,” which stars “Suicide” leading man Will Smith. Studios often purchase packages from their franchise filmmakers to keep them happy, but a source close to the “Bright” deal said WB was outbid when Netflix paid $90 million for the worldwide rights to the film.

One film executive said the fight over “Suicide Squad” was the new “status quo” for superhero tentpoles. The executive said the editing and reshooting isn’t uncommon for this type of film, especially when studios are scheduling movies prior to scripts delivery and director hires.

Warner Bros. isn’t taking any chances with “Suicide Squad” because the DC movie universe is part of a portfolio that has titles dating out to 2020. After the “BvS” fallout, Warner Bros. Entertainment chairman and CEO Kevin Tsujihara and studio president of production Greg Silverman moved the DC Films banner into a standalone film unit.

DC Films is now under the purview of the studio’s Jon Berg, in partnership with DC Comics Chief Creative Officer Geoff Johns — who reports to the comic division’s president Diane Nelson.

Also Read: Watch 'Suicide Squad' Star Jared Leto Play With Puppies (Video)

Upcoming titles include June 2017’s “Wonder Woman” with Gal Gadot, followed by the ensemble “Justice League” with Affleck, Gadot, Cavill, Ezra Miller and Jason Momoa.