Despite being set centuries in the future, the Star Trek franchise managed to incorporate historical figures from Earth's real past. As far back as Star Trek: The Original Series, Starfleet crews have encountered a wealth of important figures from history who've been allies and enemies to those exploring the galaxy. Though they all appeared through different means, every historical person to grace the franchise helped ground Star Trek in reality and added context to the interstellar adventures. Though Star Trek is mainly about science and exploration, viewers could learn a thing or two about history from the shows as well.

Starting with the appearance of famous western heroes in Star Trek: The Original Series season 3, episode 6, "Spectre of the Gun," historical figures began popping up regularly throughout the franchise for various reasons. Almost every captain of the Enterprise encountered important persons from the past, and even Captain Janeway of Star Trek: Voyager met her fair share of icons on the other side of the galaxy. The technology of the holodeck made it even easier for Starfleet crews to meet their heroes, and one titan of science even played himself in an episode. One of the keys to making Star Trek's future exciting was incorporating elements of the past.

RELATED: Every TNG Episode Based On A Star Trek Original Series Story

The Earp Brothers & Doc Holiday - "Spectre Of The Gun"

The Earp brothers and Doc Holiday walk together in Star Trek

Often described by its creators as a "Western in space," Star Trek: The Original Series even had a Western-themed episode during its third season. "Spectre of the Gun" saw Kirk and crew trapped on a strange planet that was modeled after the notorious gunfight at the O.K. Corral. Faced with re-living the historical events that were immortalized in the classic Kurt Russell Western film Tombstone, the Enterprise crew encountered the Earp brothers and their confidant Doc Holiday. Though they were only dreamlike constructs from the mind of the crew, they presented an actual danger to the Starfleet officers until they realized that their power was based on belief.

Abraham Lincoln & Genghis Khan - "The Savage Curtain"

A split image of Abraham Lincoln and Genghis Khan from Star Trek

Throughout his time as captain of the Enterprise, Kirk was often forced by unknown alien powers to fight in various arenas against deadly foes. Star Trek: The Original Series season 3, episode 22, "The Savage Curtain," pitted Kirk and Spock against some of history's most dastardly villains, but they were teamed up with some of history's greatest heroes. Though most of the historical figures were from the Star Trek timeline and were fictional, former U.S. President Abraham Lincoln represented Kirk's team, and the duo interacted quite a bit. Conversely, the notorious historical warlord Genghis Khan was one of the villains, though he was a mere caricature compared to Lincoln's portrayal.

Jack London & Mark Twain - "Time's Arrow"

Mark Twain talks to Jack London from Star Trek The Next Generation

Before Star Trek: The Next Generation season 5, episode 26, "Time's Arrow," Starfleet crews only encountered approximations of real historical figures. However, when Data was sent back to the end of the 19th century, he encountered real-life authors Jack London and Mark Twain. London, the future author of The Call of the Wild, played a small role as the hotel bellhop, but Twain was the star of the show. Twain's great wit and insatiable curiosity made him a thorn in Data's side as he attempted to return to his time, and the classic two-part TNG episode ended with the famed Tom Sawyer author getting a glimpse of the distant future.

Sir Isaac Newton - "Descent" &"Death Wish"

Isaac Newton looks on from Star Trek The Next Generation

Some historical figures made such an important impact on the fields of math and science that their legacy couldn't be overstated. Sir Isaac Newton was one such person, and his multiple appearances in the Star Trek franchise showed just how grand his discoveries were. In Star Trek: The Next Generation season 6, episode 26, "The Descent," Newton was among the scientists who joined Data in his holodeck poker game. He appeared again in Star Trek: Voyager season 2, episode 18, "Death Wish," when he was summoned by the Q to testify in a hearing. Unlike his TNG appearance, which was manufactured, it could be assumed that Q's Newton was real.

RELATED: Q Liked Picard & Janeway But Why Did He Hate Sisko?

Albert Einstein - "The Nth Degree" & "Descent"

Einstein talks with Barclay from Star Trek the Next Generation

One of the most recognizable names in the theoretical sciences, Albert Einstein had a direct impact on the fictional science of Star Trek. Because of that, his appearance in Star Trek: The Next Generation season 4, episode 19, "The Nth Degree," was a logical connection to history that the average viewer could relate to. After synthetically improving his IQ, Lt. Reginald Barclay spent an entire night on the holodeck arguing quantum physics with the historical genius, with whom he could match wits. Also, Einstein would later appear briefly in the episode "Descent" alongside his fellow scientists as they played poker with Data on the holodeck.

Stephen Hawking - "Descent"

Stephen Hawking in Star Trek The Next Generation TNG

Remembered as one of the best cameos in Star Trek history, noted scientist Stephen Hawking took things one step further by appearing as himself in the TNG episode "Descent." Like Isaac Newton and Albert Einstein, who appeared in the scene alongside him, Hawking's impact on the sciences was confirmed by his cameo in the poker scene on the holodeck. Though the real Hawking was still very much alive when the episode aired, he was certainly a historical figure by the time Data programmed him into the holodeck in the 24th century. "Descent" showed that Hawking's many theories were just as important to the future as those of his companions.

Sigmund Freud - "Phantasms"

Freud analyzes Data from Star Trek the Next Generation

Even though Data was in his 30s by the time of Star Trek: The Next Generation season 7, the sixth episode, "Phantasms," saw him discovering his unconscious mind with the help of one of history's great psychological pioneers. After having a dream that was filled with symbolism, Data turned to a holodeck approximation of Dr. Sigmund Freud for analysis. The Freud of the show was a silly caricature, more of a summary of his most outlandish ideas than an accurate recreation of the real doctor. Nevertheless, Freud's distinct brand of psychoanalysis didn't work on Data's problem, but it did offer an amusing scene that spiced up the episode.

Amelia Earhart & Fred Noonan - "The '37s"

Amelia Earhart looks on from Star Trek Voyager

The premise of Star Trek: Voyager was that the ship and its crew were launched all the way across the galaxy into the Delta Quadrant. Because of that, the appearance of famous pilot Amelia Earhart and her navigator, Fred Noonan, was quite a shocking reveal. Season 2, episode 1, "The '37s," posited that Earhart, Noonan, and a host of other humans were abducted in 1937 and cryogenically frozen on a distant planet. Captain Janeway was given the chance to meet one of her heroes, and Earhart's endearing legacy could be seen as a direct influence on her and other women who made a mark on aeronautics.

RELATED: Every Voyager Character Who Has Returned In Star Trek (& How)

Gandhi, Lord Byron, & Socrates - "Darkling"

Neelix stands next to Gandhi and Lord Byron from Star Trek Voyager

By the time Star Trek: Voyager season 3, episode 18, "Darkling," aired in 1997, plenty of historical figures had graced the franchise, but this installment found a novel use for them. While trying to construct a more robust personality for himself, The Doctor added the personalities of Gandhi, Lord Byron, and Socrates into his programming. In his quest to gain sentience, The Doctor didn't account for the darker aspects of those great thinkers' minds, and it led to the creation of an evil alter-ego to be born. The figures themselves only appeared briefly on the holodeck, but their lives were cleverly integrated into the plot of the episode.

Leonardo Da Vinci - "Scorpion" & "The Raven"

Leonardo da Vinci fires a phaser from Star Trek Voyager

Most of Star Trek's historical figures made one-off appearances or only returned for a second outing, but the Renaissance legend Leonardo da Vinci became a full-fledged reoccurring character on Star Trek: Voyager and beyond. First introduced in season 3, episode 26, "Scorpion," da Vinci acted as mentor for Captain Janeway whenever she needed advice. Referring to the artist and scientist as "maestro," Janeway used the holodeck to visit the centuries-old figure. He would return in several other Voyager episodes throughout the rest of its run, and even have a humorous cameo in Star Trek: Lower Decks season 1, episode 9, "Crisis Point."

MORE: A Star Trek Voyager Movie Made No Sense (But It Needs A Picard-Like Series)