Caitlin Cronenberg for Variety

The line stretches down Fifth Avenue in San Diego’s Gaslamp Quarter.

More than 100 people wait to tour the Michael J. Wolf Fine Arts gallery, which has been converted for Comic-Con into an exhibition of costumes and props from CBS All Access’ “Star Trek: Discovery,” the forthcoming installment in the 51-year-old science-fiction franchise. At the front of the line is a man wearing a T-shirt with William Shatner’s face on it. The man is old enough to have watched live when Shatner — aka Capt. James T. Kirk — debuted as the lead on the original “Star Trek” series.

When the doors finally open, a surprise emerges: Sonequa Martin-Green, who plays Cmdr. Michael Burnham on “Discovery” and is therefore the heir to a very rich and very nerdy cultural legacy.

Caitlin Cronenberg for Variety

“Oh, my God,” Shatner Shirt Guy says as Martin-Green extends her arms to him. Inside they take photos together. He looks smitten.

That embrace is one small but crucial mission accomplished for CBS, which with “Discovery” is bringing “Star Trek” back to television 12 years after the last spinoff, “Enterprise,” was canceled. That task alone would be high-pressure, given the large, persnickety fan base that is both blessing and curse for any “Trek” variant.

Popular on Variety

But CBS upped the stakes, forgoing the obvious route of putting the new series on its flagship broadcast network or premium channel Showtime, instead steering it to All Access with the goal of growing the streaming service’s nascent subscriber base. That goal has been obscured by headline-making production delays and the exit of a fan-favorite showrunner. But the premiere is now in sight.

“Discovery,” which is set to debut Sept. 24, is the first “Star Trek” to embrace wholly serialized storytelling and a vision of the future in which humans clash with each other, not just with what they find in outer space. It is also steeped in “Trek” lore and iconography and reintroduces multiple classic characters. The show pays homage to its predecessors while forging a vision for what a 21st-century series about the 23rd century should look like. CBS hopes that fans will embrace that vision — and, with credit cards in hand, help build a new business to carry the company forward.

Heading into Comic-Con, CBS’ short-term objective was to flip the “Discovery” narrative, which had become about delays and departures. It got a galaxy-class narrative flipper in the form of Martin-Green, who emerged as the star of a packed San Diego panel featuring cast and producers. Taking up the mantle of “Trek” heroes past, Martin-Green handily dismissed trolls who complained about an African-American woman leading a “Star Trek” series. She cited the franchise’s long record of inclusion and social progressivism. “If you say you love the legacy of ‘Star Trek’ but you don’t love that, then you’ve missed it,” she told the crowd.

Created by Gene Roddenberry, “Star Trek” premiered on NBC in 1966 and lasted only three seasons. But it became ubiquitous on syndicated TV in the ’70s and ’80s. Rooted in science fiction’s literary new wave, the original series broke social ground, presenting a multicultural view of humanity’s future — as well as TV’s first interracial kiss. Later manifestations would lean humanist-progressive (“The Next Generation”) or bang-bang-pow-pow (the recent feature films from J.J. Abrams).

An Alabama-born actor who trained and began her career onstage, Martin-Green is no stranger to vocal fan bases: Her first series-regular work came on AMC’s “The Walking Dead.” But she is new to the “Trek” universe. Since booking the role of Burnham, she has plowed into the original series and “Enterprise” — the two shows that, in terms of timeline, bookend “Discovery,” which is set during a war between the egalitarian United Federation of Planets and the noble-warrior Klingon Empire. She promises to get to the other shows soon.

Caitlin Cronenberg for Variety

Martin-Green has proved a quick study. Already she grabs hold of the central themes of “Star Trek” and hoists them up as important ideals — a mix of moral philosophy and fan service.

“Anyone doing a new iteration of ‘Star Trek,’ you have to understand how deep it is; you have to understand how important it is,” she tells Variety. “You have to understand how much of a pillar it is to our culture. I think you need that in order to really give it the weight it deserves, and I think that — I hope that more than anything — people get the sense of how serious we take this.”

Martin-Green is prepared for the life-changing effect the show will have, once it premieres, on her and her co-stars, who line up to praise her on-set leadership. (Jason Isaacs, who plays Capt. Gabriel Lorca, calls her “the mother of that set.” Adds Michelle Yeoh, who plays Capt. Philippa Georgiou: “She’s an absolute love angel.”)

“When I first got started, I had my freak-out phase,” Martin-Green says. “I had my almost catatonic moment where I thought, ‘What is happening?’ And I knew very quickly that I couldn’t live there and that I couldn’t create there. I owed it to the story and I owed it to the legacy to get it together. And I had to focus myself in gratitude. I had to focus myself on the passion for the vision for the story that we’re doing.”

Isaacs signed on because of the message the show sends in the Trump-Brexit era. “The world is complicated and horrible, and I don’t know how to explain to my children the insanity of the people who are in charge of it at the moment,” he says. “I thought it was a good story to tell — and something I would be happy to watch — about presenting a vision of the world that’s full of drama but also full of resolution and unity.”

Martin-Green first met with “Discovery” co-creator Bryan Fuller at New York Comic-Con last October. Fuller talked to her about Burnham, a human orphan raised on planet Vulcan alongside Spock — Leonard Nimoy’s alien first officer from the original series — and thus caught between two cultural identities. Knowing that her character would be killed off “The Walking Dead,” she shot a video audition. But her remaining “Walking Dead” responsibilities presented a conflict, and CBS continued to look elsewhere.

Three weeks after that Comic-Con meeting, CBS announced Fuller was leaving his post as showrunner.

“Anyone doing a new iteration of ‘Star Trek,’ you have to understand how deep it is. … You have to understand how much of a pillar it is to our culture.” Sonequa Martin-Green

The official line is that Fuller departed via a mutual and amicable decision to focus on his other project, Starz’s “American Gods.” He is still listed as co-creator of “Discovery” alongside executive producer Alex Kurtzman, who speaks glowingly of him. He shares a story credit with Kurtzman on the premiere, as well as a screenplay credit with another exec producer, Akiva Goldsman. CBS Corp. CEO Leslie Moonves calls him “brilliant.”

But sources close to Fuller and within CBS say that he was pushed out. Fuller is known as an innovative showrunner and the creator of critically adored television such as “Hannibal.” He is not known as someone who prioritizes deadlines and budgets above all else. In short: He is not a typical CBS showrunner. (Fuller declined to comment.)

Fuller brought another key asset to the table — street cred. He cut his teeth writing on “Star Trek” series “Deep Space Nine” and “Voyager.” He is liked and respected in “Trek” fan communities — which CBS hopes to convert to All Access subscriber communities.

“It was really important that we get somebody with a lot of ‘Trek’ cred versus just getting somebody who would be an interesting voice,” says David Stapf, president of CBS Television Studios. “We felt like it would be smart business to give the fans what they wanted. There’s not a whole lot of people who have the visionary capability along with the ‘Star Trek’ credibility and experience. So Bryan became a good and obvious choice to do that.”

But Fuller failed to deliver scripts months after they were due. In September, he and Kurtzman met with Moonves to deliver the news that “Discovery” would not make the January premiere he had been publicly touting. Moonves accepted the delay, though not happily. “It wasn’t his favorite news, but he totally understood,” Kurtzman says. A month later, Fuller was gone.

The scripts weren’t the only things running late. “Discovery” takes place on multiple starships in a future version of deep space. Creating its environments involves doing more than scouting an appropriate Irish castle. The level of detail on the sets is exacting — to the point that visitors so inclined could convince themselves at times that they were not on a set. That exactitude proved more time-consuming than anticipated.

“Discovery” shoots at Toronto’s Pinewood Studios on multiple soundstages, one of which is the largest in North America. It is possible to get lost in the tangle of corridors and rooms that make up the starships Discovery and Shenzhou. The set for a third, a Klingon starship, cost $3 million.

“Every element of production was challenging,” Kurtzman says. “For props, you can’t go to a store and buy pieces of something. You have to manufacture everything.”

CBS would push the show’s premiere date twice — first from January to May, then from May to September. Kurtzman and CBS representatives claim the second delay was due to restrictions in Martin-Green’s “Walking Dead” contract. But the first delay appears to have opened the door for Martin-Green to land the role. She auditioned in person in December, and by January she was shooting.

Caitlin Cronenberg for Variety

Like a big sci-fi feature, “Discovery” hasn’t been cheap: The average episode costs $8 million-$8.5 million. “It was like shooting a movie, the scale of it,” Yeoh says of making the pilot, which was directed by David Semel, who clashed with Fuller. “It wasn’t just ‘Quick, let’s get the shot. Move, move.’ ”

Only a handful of shows have ever had the kind of budget that “Discovery” has. And many, like “Discovery,” were dogged by reports of behind-the-scenes drama. Netflix sacrificed its more-successful-than-thou image to cancel “Marco Polo” and “The Get Down.” “Vinyl” contributed to the firing of HBO’s Michael Lombardo, one of the most successful programming execs of the last decade.

Others notably have recovered: “Westworld,” plagued by delay and controversy, became HBO’s most-watched freshman series ever. “Game of Thrones” famously had to scrap its pilot; it has gone on to win more Emmys than any other drama series. And “The Walking Dead” remains TV’s highest-rated show in the 18-49 demo even as a vicious court battle between AMC and former showrunner Frank Darabont spills into public.

For CBS, however, the question looming over “Discovery” is whether the decision to place one of the most expensive shows in TV history on a platform where it will be initially exposed to fewer than 2 million potential U.S. viewers is a good business move. Part one of the premiere will debut on CBS, with part two available to watch immediately after on All Access, where all subsequent episodes will debut weekly. There are no plans for future episodes to air on CBS broadcast or anywhere else on linear television.

CBS launched All Access in 2014 as a paid, ad-supported service that was, at first, mostly a storehouse for library material like “Cheers” and “I Love Lucy.” But it was always meant to be more.

“Going back to the very beginning, we knew that adding to the overall number of shows that people could watch with All Access was very interesting to us — that with the subscription model complementing the advertising model, we would have the business model to support making original shows to increase that library,” says CBS Interactive CEO Jim Lanzone.

“Discovery” was supposed to be All Access’ first original series. The production delays changed that. Instead the honor went to legal drama “The Good Fight,” which has been renewed for a second season. Last month, CBS announced All Access series orders for the Will Ferrell-produced comedy “No Activity” and two new dramas, “Strange Angel” and “$1.”

Moonves has set a goal of 4 million subscribers for All Access by 2020. Last month, he announced that All Access and Showtime’s direct-to-consumer product had, combined, reached that target. CBS would not specify the number of subscribers for each, but Showtime is believed to be the more popular.

“Every element of production was challenging. For props you can’t go to a store and buy pieces of something. You have to manufacture everything.” Alex Kurtzman

Regardless, All Access — which offers a $6-a-month ad-supported subscription and a $10 ad-free option — is an important component of CBS’ digital future alongside Showtime, ad-supported news service CBSN and an in-the-works CBS Sports streaming product. It’s also important to Moonves’ legacy.

“We’ve been surprised by how well they’ve done,” TV business analyst Michael Nathanson says of All Access. “The idea is that there are all these superfans out there who don’t want to pay for [large cable packages]. If you’re able to identify people who are superfans or who are not part of the pay-TV ecosystem [but will] pay six bucks a month — it’s not going to be a meter-moving number today, but if they can grow their business to 4 million subs, it’s going to start being really meaningful in three or four years.”

In 2008, advertising accounted for 66% of all CBS Corp. revenue. In 2016, that number fell to 48%. Affiliate and subscription fees made up 22% of revenue for the company last year versus 9% in 2008.

Moonves has spent the last few years shifting CBS away from a dependency on dwindling TV ad dollars. Licensing content to Netflix and other streaming services has been one source of revenue, but those services are increasingly focused on their own original programming. With All Access, CBS reaps more per subscriber than what it gets in retransmission fees for its linear-television products.

“It was no surprise to us that Netflix would eventually take this route into a greater and greater percentage of original content, which is why it’s important for us to produce original content for All Access going forward,” Moonves says. “People say, ‘Is it a hedge against retrans debates that we may have with some of the MVPDs or virtual MVPDs?’ The answer is, ‘All of the above.’”

Moonves expects “Discovery” to be a big driver of subscribers , though he declines to name an exact figure.

“Look, this was a big call for us,” he says of placing “Discovery” on All Access. He notes that both the CBS network and Showtime wanted the series, as did Amazon and Netflix, which will stream it internationally. (With the Netflix deal, the number of new All Access subscriptions “Discovery” is expected to generate and other factors, CBS considers the series paid for.)

“Getting our content online, having it streamed, having it be an important part of our company going forward, we said all right, there is no better way to launch it to the upper level than to take ‘Star Trek,’ which is the family jewels, and put it there to attract millions of viewers,” Moonves says.

Gretchen J. Berg and Aaron Harberts are now the keepers of Moonves’ family jewels.

Fuller’s top lieutenants, CBS tapped the two to take over as day-to-day showrunners after their boss departed. They’d worked with Fuller on “Pushing Daisies” and “Wonderfalls” and had co-run two shows of their own, NBC’s “Mercy” (with Liz Heldens) and ABC’s “GCB,” each of which lasted one season. They were not “Star Trek” aficionados.

But Fuller sold them on “Discovery” when he recruited them as staff writers. “Gretchen and I knew that it would be a challenge,” says Harberts. “We knew that we would be so far out of our comfort zone. But he made us feel brave.”

Caitlin Cronenberg for Variety

Berg and Harberts, who were classmates at Northwestern, have been constants in each other’s lives for more than 20 years. They first wrote a “Friends” spec together, meeting every morning for three hours at the CBS Radford lot, where Berg worked as an assistant to a producer on “Caroline in the City.” Harberts would then head to Universal, where he was an assistant in the movie-of-the-week department. They landed their first staff jobs in 1998 on “Beverly Hills, 90210.”

They sought Fuller’s blessing before accepting the showrunner job. “The only reason we stayed was because we believed in Bryan’s vision,” Harberts says. “So many people had already been giving so much, and there was something about handing this over to someone who hadn’t been involved in any of it and having that person just wipe the slate completely clean.”

Berg continues: “Or get it wrong, because you know sometimes when you pitch something and somebody says, ‘I totally get that,’ and they run with it and you see it later and go, ‘But that’s not what we were talking about!’ — we didn’t want that to happen either.”

Kurtzman praises their leadership. “They are the showrunners,” he says, noting that they have “the tiebreaker vote” on all creative disagreements. “Every time they use it, I’m glad they did,” he says. “They have always made the best choice.”

Though no renewal is yet official, Berg and Harberts have a road map for season two and the beginnings of one for season three. They are Trekkers now.

“They’re my brother- and sister-in-arms,” Martin-Green says. “We have such a beautiful dynamic together, the three of us. And we just dig in together. We’re uncovering; we’re unearthing; we’re hoping to uplift.”

Given the show’s platform, it will be difficult to judge just how many people are being uplifted by “Discovery.” As is common with streaming services, no ratings will be forthcoming. CBS is unlikely to reveal detailed All Access subscriber numbers after the premiere. There will be no easy way to measure the success or failure of “Discovery” — save one.

“Our metric right now is Les Moonves saying, ‘I’ve watched the first six episodes, and I love them,’” Harberts says. “That’s the metric at the moment.”