After a tumultuous journey spanning several years, ‘The Flash’ finally makes it to the end.

The tumultuous process of making “The Flash” and bringing it to theaters was beset by multiple challenges. The shoot took 138 days, with cast and crew isolated from friends and family during a pandemic. Coordinating schedules for A-list cameos, such as Ezra Miller’s, whose post-filming legal troubles amid a mental health crisis made headlines, added to the difficulties. Behind the scenes, the studio was rethinking its whole DC Comics strategy amid leadership changes.

To complicate matters further, there was a worldwide shortage of shipping containers in 2021, which presented a significant hurdle for transporting a two-ton, original Batmobile from Los Angeles to the U.K. This iconic vehicle was necessary for the grand return of Michael Keaton’s Caped Crusader, requiring the construction of a life-size replica of the Batcave from scratch.

Director Andy Muschietti and producer Barbara Muschietti anxiously awaited the arrival of the Batmobile, worried that it might not make it in time or end up stranded in the middle of the ocean due to the global shortage of shipping containers. Fortunately, the iconic vehicle managed to arrive safely at its destination, allowing the team to heave a sigh of relief. However, the next challenge was how to transport the Batmobile into the Batcave at Warner Bros. Studios Leavesden. Eventually, they devised a plan that involved using a modified airport cargo truck, which elevated the vehicle 20 feet (6 meters) in the air before gently rolling it onto the set.

Barbara Muschietti recently described the experience of making “The Flash” as an adventure, peppered with challenges that the team had to navigate. Indeed, the journey to bring the lightning-fast comic book character to the big screen has been a long and complex one, with various actors and directors attached to different versions of the movie since the late 1980s. Ryan Reynolds and David S. Goyer were once attached, as were George Miller and Adam Brody.

However, in 2014, Warner Bros. began to establish plans for a shared universe of DC Comics movies, with Miller cast as Barry Allen, the Flash, who would make appearances in “Batman v Superman: Dawn of Justice,” “Suicide Squad,” and “Justice League.”

However, the process of getting “The Flash” into production was far from straightforward, as there were disagreements over tone and scheduling conflicts. Many writers and directors were involved in developing the movie, including Phil Lord and Christopher Miller, Seth Grahame-Smith, Rick Famuyiwa, Robert Zemeckis, and John Francis Daley, and Jonathan Goldstein. As a result, the movie’s release dates were frequently pushed back, and Ezra Miller even worked on their treatment of the script.

The Muschiettis were in the midst of finishing “It Chapter Two” when the studio presented them with the idea of directing “The Flash.” Despite the project’s complicated development history, they were primarily interested in determining if it was worth committing several years of their time.

Ultimately, they were drawn to the film’s emotional core, particularly the relationship between Barry Allen and his mother, who was killed when he was a child and whose life he seeks to alter through time travel. The Muschiettis, who are fans of the film “Back to the Future,” which is referenced in “The Flash,” decided to proceed with the project.

Screenwriter Christina Hobson, who wrote “Birds of Prey,” had previously worked on the story for “The Flash.” Her script provided ample fun and emotional depth while also introducing the multiverse to the DC Extended Universe. While trying to save his mother, Barry Allen ends up being transported to another timeline where he encounters a younger version of himself.

This setup allowed for various possibilities, including featuring Michael Keaton’s portrayal of Batman, which had been inactive for over three decades, alongside Ben Affleck’s “Zack Snyder Batman.”

Andy Muschietti expressed excitement regarding Keaton’s return to the Batman role: “We all got very excited about the prospect of having Michael Keaton come back after 30 years of not knowing what Batman was up to. The multiverse allowed this to happen and combine the existing characters, the existing universe, with something that seemed to have been buried in the past.”

The Muschiettis were so determined to have Michael Keaton onboard for “The Flash” that they made it clear to him during their initial lunch meeting in Brentwood that they wouldn’t be able to carry on with the film without him.

They wanted Keaton’s Bruce Wayne to be portrayed in a manner that would be unexpected, rather than simply sitting by the fireplace with a whiskey glass, so that his transformation back into Batman would feel plausible.

“The Flash,” which includes cameos from a host of familiar characters and has a nostalgic tone, sets the stage for a universe reboot. While the film was being made, changes in the upper echelons of Warner Bros. and DC Studios were happening, with new co-chairs and CEOs James Gunn and Peter Safran tasked with charting a course for returning characters like Superman and Batman.

Although the new vision won’t officially launch until Gunn’s “Superman” is released in 2025, “The Flash” has been touted by Gunn as resetting the entire DC universe.

Post-production on “The Flash” was complicated by Ezra Miller’s numerous run-ins with law enforcement and their erratic behavior, which garnered headlines in 2020. Miller was arrested twice in Hawaii, including for disorderly conduct and harassment at a karaoke bar.

In January, they pleaded guilty to a criminal charge related to breaking into a neighbor’s house and stealing alcohol. While they avoided jail time, they were fined $500 and put on probation for a year, agreeing to adhere to specific terms, such as continued treatment for mental health.

Despite Ezra Miller’s legal issues, the studio opted to release “The Flash” on June 16, regardless of Miller’s absence from the film’s promotional activities. The Muschiettis maintained that Miller remained committed to the movie and continued to take their treatment seriously.

“We want everybody to see this. It’s great and it’s special. And it has all our hearts and guts,” said Barbara Muschietti.

Early buzz surrounding “The Flash” was positive, with director James Gunn labeling it one of the best superhero movies he’d seen. The film’s dual roles played by Miller received particular praise.

The Muschiettis’ future in DC films is currently speculated upon, but the immediate focus is on the success of “The Flash.”

“Let’s just wait and see,” said Andy Muschietti.