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.

Season 12 of Doctor Who ended with a massive revelation: the Doctor learned she wasn't who she thought she was, that she was much, much older, from another universe and that part of her life was erased by the Time Lords. Because of her past actions, she was then deemed a fugitive from the Judoon and locked up in a high security cosmic prison.

Now, in the show's New Year's Day holiday special, "Revolution of the Daleks," the Doctor begins her sentence, and it turns out it lasts much longer than anyone anticipated. How long is the Thirteenth Doctor locked up? Nearly 20 years.

RELATED: Doctor Who Welcomes Comedian John Bishop to the TARDIS

The trailer for "Revolution of the Daleks" teased the Doctor's stay in prison would last a long while. Indeed, thanks to the tally marks scattered around her cell, it appeared as if the Doctor wouldn't rapidly be reunited with her companions.

As the holiday special begins, the Doctor is in prison and already seems accustomed to her new routine. Before long, we come to understand the she has been there for years, and is fighting hard to keep her spirits up, reminding herself there are people counting on her.

The exact time the Doctor spends in prison is finally revealed when, one day, she recognizes the person in the cell next to her: Captain Jack Harkness. Jack made it his mission to break the Doctor out of prison, explaining he committed multiple crimes to get locked up in the same prison as her, and it then took him 19 years to finally be placed in her neighboring cell.

Thankfully, he wastes no time in getting the Doctor out and reuniting her with her TARDIS.

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

Before the Doctor and Jack return to Earth, she exclaims that these last decades have been extremely difficult. She's spent the whole time fixated on the revelations that shattered her life, wondering who she truly is. Thankfully, Jack reminds her that, no matter the secrets of the past, she is the Doctor.

With renewed focus, the Doctor heads back to Earth to reunite with her companions, Yaz, Graham and Ryan. When she sent them home in the Master's TARDIS at the end of Season 12, she made sure no time would pass for them. However, she got the calculations a bit wrong and when she finds them again, it's been 10 months for them -- 10 months of being on their own, of wondering what happened to the Doctor and searching for her.

This extended wait is what leads Ryan to decide he is no longer interested in traveling with the Doctor and his grandfather, Graham, agrees to stay with him, leaving Yaz as the only member of the trio willing to accompany the Doctor on further adventures across space and time. The Doctor's time away in prison may not have been the same for everyone, but the separation still had a big impact on all four characters -- and it ultimately changes the series as it heads into Season 13.

"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