WARNING: The following contains spoilers for the Doctor Who New Year's Day holiday special, "Revolution of the Daleks," which premiered Jan. 1 on BBC America.

The Season 12 finale of Doctor Who ended with Jodie Whittaker's Thirteenth Doctor being arrested by the Judoon and locked up in a massive cosmic prison. Now, in the New Year's Day special, "Revolution of the Daleks," fans find the Doctor right where they last saw her -- in her prison cell. Thanks to the tally marks all across the walls, it's clear that she's now been here a very long time, but thankfully, the Doctor is still the Doctor.

It's a long sentence, but the Doctor manages to keep her spirits up, at least as much as she can. In fact, it's because of her imprisonment that fans find out what one of her favorite stories is: Harry Potter.

RELATED: Doctor Who Welcomes Comedian John Bishop to the TARDIS

Doctor Who Jodie Whittaker Leaving Header

In her space prison, the Doctor has a new routine dictated by her jailors. She wakes up thanks to a digital interface that shows her the sun rising; she follows the instructions to get a bit of physical activity; she eats the same block of food every day, and she is taken to the main floor for the day before being taken back at night.

It's before one of those nights that the Doctor, talking to herself, reveals how fond she is of Harry Potter. Before she falls asleep, she asks herself if she wants to hear a bedtime story. From there, she begins to recite a book, saying, "Mr. and Mrs. Dursley, of number four Privet Drive, were proud to say that they were perfectly normal."

RELATED: Game Of Thrones' House Of The Dragon Prequel Casts Doctor Who's Matt Smith

The Doctor is interrupted before she can get any further, but Harry Potter fans will recognize that this is the opening sentence of the first book in J.K. Rowling's popular fantasy series, Harry Potter and the Philosopher's Stone. This means that the Doctor loves the books so much, she has memorized them in their entirety. In prison, where she has nothing and where she finds herself on the brink, she tells herself a tale of magic, hope and overcoming evil.

It makes perfect sense that Harry Potter would be one of her favorite stories, given that both Doctor Who and Harry Potter are popular British franchises. The Doctor is well versed in literature and British history, so of course, she would know all about Harry Potter. The surprising part is that she isn't just aware of the books -- she's a total fan.

"Revolution of the Daleks" stars Jodie Whittaker, Bradley Walsh, Mandip Gill, Tosin Cole, John Barrowman, Chris Noth, Harriet Walter and Nathan Stewart-Jarrett. The Doctor Who holiday special aired on BBC America on Friday, Jan. 1.

KEEP READING: Doctor Who Introduces Two New Types of Daleks - and They Go to WAR