Joss Whedon has left as writer and director of the “Batgirl” movie for Warner Bros. and DC Entertainment, citing story issues as the reason for his departure.

“Batgirl is such an exciting project, and Warners/DC such collaborative and supportive partners, that it took me months to realize I really didn’t have a story,” Whedon said in a statement.

Whedon thanked DC president Geoff Johns and Warners Picture Group president Toby Emmerich, saying, “I’m grateful to Geoff and Toby and everyone who was so welcoming when I arrived, and so understanding when I… uh, is there a sexier word for ‘failed’?”

Variety first reported last March that Whedon had come on to “Batgirl” following a meeting between Whedon, studio exec Jon Berg, and Johns.

Sources close to the situation told Variety that the decision for Whedon to depart was a mutual one and reflects the studio’s desire to seek more female directors — particularly on projects centered on female characters.

Batgirl has been a popular superhero for more than 50 years, but has never gotten her own movie. The movie was to be based on the Batgirl story that was first unveiled in DC Comics in 1967, when Barbara Gordon, the daughter of Gotham City police commissioner James Gordon, appeared as the character in “The Million Dollar Debut of Batgirl!” by writer Gardner Fox and artist Carmine Infantino.

With Whedon’s departure, it’s uncertain whether Warner Bros. will continue development of a “Batgirl” movie. The Batgirl project would be the second movie from DC Films to star a female lead after Gal Gadot’s “Wonder Woman,” one of the biggest box office hits of 2017. The studio is moving ahead with a “Wonder Woman” sequel with Gadot and director Patty Jenkins returning and has set a Nov. 1, 2019, release date.

Warner Bros. has been developing a “Gotham City Sirens” project with Margot Robbie starring as her Harley Quinn character from “Suicide Squad” and David Ayer directing.

Whedon had seen considerable success in the Marvel Cinematic Universe, having written and directed 2012’s “The Avengers” and 2015’s “Avengers: Age of Ultron” for Disney-Marvel. He also created the television series “Buffy the Vampire Slayer,” “Angel,” “Firefly,” “Dollhouse,” and “Agents of S.H.I.E.L.D.”

Whedon stepped in last spring to handle the reshoots and finish “Justice League” for Warner Bros. last spring after director Zack Snyder publicly excused himself from the project, following his daughter’s suicide in March. Warner Bros. spent about $25 million on the re-shoots in London and Los Angeles over two months.

Whedon received a screenplay writing credit on “Justice League” along with Chris Terrio. He’s repped by CAA.

“Justice League” was the fifth installment in the studio’s DC Extended Universe, which launched with 2013’s “Man of Steel,” followed by 2016’s “Batman v Superman: Dawn of Justice,” “Suicide Squad” and “Wonder Woman.” “Justice League” was the lowest grosser of the five titles with $657 million worldwide.

“Aquaman,” starring Jason Momoa, is the next title in the DC Extended Universe with a Dec. 21 release date. “Wonder Woman 2” is the only other film in the DCEU that has been set for release.