Most science fiction stories take place in space, or tend to be more focused on the future than on history. The popular and long-running British TV series Doctor Who is an exception to this rule. Since the Doctor has the power to travel through space and time, they visit not only the distant future but also sometimes go in the past.

RELATED: Best Doctor Who Episodes That Featured Weeping Angels

On more than one occasion, the Doctor and their companions got to meet real historical figures and help them solve a problem that plagued them. Seeing familiar faces and names interact with the Doctor in the show is a part of its charm, and some of the best Doctor Who episodes about real-life historical figures will entertain even those viewers who aren't usually interested in history.

5 The Shakespeare Code (S3 E2)

Doctor Who The Shakespeare Code

William Shakespeare is one of the most iconic names in literature, so it was only a matter of time before Doctor Who would include a Shakespearean story. And what better way to do it than to focus on a mystery around Shakespeare's lost play?

Initially, the Tenth Doctor and Martha Jones have no idea they're about to face three cunning witches who have been manipulating Shakespeare. The episode offers some hilarious banter, but also isn't afraid to dig deeper into the uneasy life conditions in Elizabethan England. It also explores the strained relationship between Martha, who clearly likes the Doctor, while he is oblivious to her feelings and is still grieving for Rose.

4 The Unicorn And The Wasp (S4 E7)

Doctor Who The Unicorn and the Wasp

Doctor Who honors Agatha Christie, one of the greatest writers of murder mysteries, by including Christie in a murder mystery that the Tenth Doctor and Donna Noble have to try and solve. And considering that the Doctor has the tendency to attract the supernatural and unusual, this murder is something that even Christie's most famous literary character, Hercule Poirot, might have a problem solving.

RELATED: Best Villains Of The Modern Doctor Who Series

The episode is full of tension as nobody knows the murderer's identity, their motive, or who will die next. Even the Doctor himself is in danger at one point. The dynamic between Donna, the Doctor, and Agatha is the highlight of the episodes. Plus, the episode is inspired by real events, specifically Agatha Christie's mystery disappearance for a few days that the writer never explained to the world.

3 The Girl In The Fireplace (S2 E4)

Doctor Who The Girl in the Fireplace

Easily one of the most touching episodes of the renewed Doctor Who, "The Girl in the Fireplace" focuses on Reinette Poisson, the future Madame de Pompadour. The Doctor saves Reinette from monsters when she's just a child, and comes back to her over the years as the phantoms who once haunted her make an appearance again. Even though the Doctor manages to solve the mystery, the episode still has a rather sad ending.

The Doctor and Reinette build a deep bond throughout their repeated meetings, even developing romantic feelings. The Doctor even promises that Reinette can come travel with him, because she's always wanted to see the stars. But when he comes back for her, he finds out she's already passed away, never giving up the hope she would see him again. The end of the episode is heartbreaking. The story is even more memorable thanks to the soundtrack as well as the natural chemistry between David Tennant and Sophia Myles, who guest starred as Reinette.

2 Vincent And The Doctor (S5 E10)

Doctor Who Vincent and the Doctor

A storytelling pattern that repeats in multiple episodes is that the Doctor comes across a historical figure, helps them solve a mystery that endangers them, and makes their life better. That's also the case of "Vincent and the Doctor." The Eleventh Doctor and Amy Pond travel to 1890 and meet Vincent van Gogh, who's not doing very well at the time. Not only is he haunted by an invisible monster, but he is also ridiculed by those who don't understand his mental illness.

RELATED: Best British Sci-Fi Series To Watch If You Love Doctor Who

After dealing with the monster, the Doctor and Amy help Vincent in yet another way. They take him into the future and show him that his art is later celebrated and beloved by many people. Even though they fail to change Vincent's destiny, they most likely make him feel like what he's doing has a point. The touching story that delves deep into Vincent's character leaves a strong impression, in large part thanks to Tony Curran's performance in the role.

1 Rosa

Doctor Who Rosa

Not every historical figure appearing in Doctor Who could say they got an entire episode named after them, but Rosa Parks is one of the few exceptions. Everybody familiar with the history of the 20th century will know Rosa's story. Her bravery and defiance led her to stand up to racism and made her into a symbol, an icon. The episode shows that racism has an impact oj many people, including the Doctor's companions Ryan and Yaz.

So it's even more satisfying for the viewers when the Doctor and her companions help to make sure that history stays on track and ensure that Rosa finds the courage she needs to stand against those who oppress her. The episode also ends on a positive note, showing that all the problems Rosa Parks went through weren't in vain, making it one of the more optimistic stories in the show.

MORE: Best Doctor Who Christmas Special Episodes