The season finale of CBS All Access' Star Trek: Discovery Season 4 aired on March 17. The Bryan Fuller and Alex Kurtzman-created series has often split the opinion of Star Trek fans, some of whom felt that it never truly lived up to the spirit of its predecessors.

The fourth season appears to have been much better received, however, with a Tomatometer score of 92% on Rotten Tomatoes. The season finale also attracted a lot of attention, not just for the story, but also a notable cameo from Democratic Party stalwart Stacey Abrams.

Abrams is the latest in line of celebrities making cameos on popular shows, often to mixed results. Chris Brown on Blackish, Justin Bieber on CSI and the legendary Prince on New Girl are some of the famous celebrity cameos that have made headlines over the years.

Even politicians are no stranger to featuring on their favorite shows: Former Republican presidential nominee John McCain famously appeared briefly in an episode of Fox network's classic action-drama, 24.

McCain was reportedly a huge fan of the show, and it is a similar story with Stacey Abrams and Star Trek: Discovery, as she is said to be a very faithful Trekkie.

What Is The Plot Of 'Star Trek: Discovery?'

The plot summary for Discovery on the official Star Trek website reads, 'Star Trek: Discovery' follows the voyages of Starfleet on their missions to discover new worlds and new lifeforms, and one Starfleet officer who must learn that to truly understand all things alien, you must first understand yourself.

The Starfleet officer who the story of Discovery is centered around is Michael Burnham, who starts out as a science specialist on the spaceship known as USS Discovery. She ends up becoming captain of the ship, albeit through a journey that has her imprisoned for mutiny. She is also the adopted sister of famous Star Trek character, Spock.

Captain Burnham is portrayed in exemplary fashion by Sonequa Martin-Green, otherwise best known as a member of The Walking Dead cast, where she plays a character called Sasha Williams.

RELATED: 'Star Trek: Discovery' Showrunner Walks Fans Behind The Scenes Of New Season

Other actors on the cast of Discovery include Doug Jones (Hellboy, The Shape of Water) as a Kelpien officer called Saru, Anthony Rapp (The Other Woman) as chief engineer Paul Stamets, and Noah's Arc's Wilson Cruz, who plays Stamets' husband, Dr. Hugh Culber.

How Did Stacey Abrams End Up On 'Star Trek: Discovery'?

According to reports, it is in fact Cruz who fans have to thank for the illustrious cameo in the episode, titled Coming Home. The episode was written by showrunner Michelle Paradise, and directed by Olatunde Osunsanmi (Falling Skies, The Fourth Kind).

It was the latter who revealed the process that led to Abrams featuring on Discovery, during an interview that he did with TV Line. "Wilson Cruz has a relationship with her, and he asked Michelle Paradise and Alex Kurtzman if they’d be willing jump on the phone with her," Osunsanmi explained. "It turned out that she is a legit fan, quoting dialogue from episodes."

Most of the people on set were apparently in the dark about the intended appearance on Discovery by the 2022 Georgia gubernatorial candidate. "She came on set and everybody’s head exploded, because 90 percent of the crew didn’t know she was coming," Osunsanmi revealed. "You could just see necks break like, ‘What?! Stacey? What is going on?’"

RELATED: Will Matthew McConaughey Really Run For Governor? Fans Don't Think So

Osunsanmi also explained his mixed feelings about having to direct someone with the profile of Stacey Abrams.

What Role Did Stacey Abrams Play In 'Star Trek: Discovery'?

"It was really strange to be directing Stacey Abrams, but it was really cool at the same time," the director revealed. Nonetheless, he felt that the politician delivered every single thing that was expected of her. "She killed it," he continued. "She knew her lines, knew the intentions and motivations behind them, delivered them great and understood the blocking that I was trying to do with it."

It would have been easy for Abrams to step into the shoes of her character, given that she in fact portrayed a politician on the show. In a story world set more than ten centuries from present time, the 48-year-old portrayed a character defined as 'President of United Earth.'

It was not just Osunsanmi who was impressed with Abrams' cameo, as Sonequa Martin-Green herself gushed over the popular Georgian, in an interview with Deadline.

"I’m still floored when I think about Stacey gracing us with her presence in our Season 4 finale," she said. "She wowed us with her charm, humility, and generosity, and she whipped out some acting chops too!"

NEXT: The Truth About Nathan Fillion's Cameo On 'The Big Bang Theory'