James Cameron, the director of such legendary film fare as “Terminator,” “Aliens,” “Titanic” and “Avatar,” has been thinking about Alita for a good long time.

Cameron says fellow director Guillermo del Toro introduced him to a Japanese manga series called "Battle Angel Alita" in the late 1990s. Smitten with the material, in 1999 Cameron started developing the script for what would become the film adaptation "Alita: Battle Angel." The movie hits theaters this week, but it took a long road to get there.

The manga “Battle Angel Alita," first published in 1990, was created by Yukito Kishiro. Called “Gunnm” ("gun dream") in Japan and set several centuries hence, it's the story of an amnesiac cyborg named Alita, who is found in a trash heap by cybernetics doctor Daisuke Ido. Ido puts her body back together. Alita tries to recover memories of her past, becomes a bounty hunter (as one does) and generally beats everyone senseless — robot, human and a combination thereof.

• RELATED: Q&A: ‘Alita’ director Robert Rodriguez says James Cameron is his personal Terminator

“Battle Angel Alita” was a smash hit for Kishiro, and the series concluded in 1995 after nine volumes. Kishiro then worked on worthy but less financially successful properties, and he eventually followed the series up with two manga sequels: “Battle Angel Alita: Last Order” (2000-14) and “Battle Angel Alita: Mars Chronicle” (2014-present). The character starred in anime and video game adaptations in the 1990s, too.

In 2000, Cameron made his first foray into television with the Fox show “Dark Angel,” that A) borrowed an awful lot from “Battle Angel Alita,” B) delivered a grimy, post-apocalyptic, cyberpunk future where advanced technology dwelled in dank alleys and c) introduced the world to 19-year-old Jessica Alba.

After being hyped to the hills, “Dark Angel” did OK in the ratings its first season, moved to a lesser time slot its second season and got cancelled thereafter. “Dark Angel” was fun trash, and Alba cut a camp, techno-goth figure. But the show is oddly forgotten today, subsumed by its proximity to “Buffy the Vampire Slayer,” which was still very much on the air.

• RELATED: ‘Alita: Battle Angel’ is a weird ride. Here's our review.

It’s the sort of program that would likely thrive in the contemporary streaming-verse. With “Dark Angel,” Cameron was a little too ahead of his time. Looking back, it serves quite clearly as proof of concept for a feature-length adaptation of Alita's adventures. As the years wore on, “Battle Angel Alita” became the sort of project one would often see referred to as Cameron's "next.”

In 2003, Cameron told the media that an “Alita" movie was imminent, either as his next project or the one after that.

Hold that thought, Jim.

In 2004, he said “Battle Angel Alita” was next after the documentary “Aliens of the Deep.” This did not happen.

In 2005, Cameron announced that he was putting “Battle Angel Alita” on hold to make what became “Avatar,” which was released in 2009.

Whatever one thought of the movie (and reviews were decidedly mixed), “Avatar” felt like another Cameron-sized leap forward for the technology of moviemaking. “Battle Angel Alita” again seemed around the corner, but Cameron concentrated on writing (and making, perhaps) the “Avatar” sequels, which are listed on the Internet Movie Database and everything.

Cameron shared a three-hour script and hundreds of pages of notes with his old friend Robert Rodriguez in 2015, eventually enlisting the Austin-based director to helm the project, which finally shot in late 2016 and early 2017. Along the way, the film adaptation of the manga flipped a couple words in the title, becoming "Alita: Battle Angel."

We look forward to “Alita 2” in 2039.