Chris Chibnall has admitted he almost "called it a day" on Doctor Who due to the challenges posed by COVID-19, saying it's "a miracle" they were able to keep the show afloat.
The showrunner told Radio Times that things looked bleak for Doctor Who and its production schedule amid the pandemic lockdowns in 2020.
"That we made Doctor Who at all during the past two years is a miracle," the Broadchurch creator said.
He added: "There was a point around April/May 2020 where it looked like we’d have to call it a day after two series.
"If we hadn’t already planned to leave after series three, there’s no way I’d be staying on now after going through that experience."
Watch: Trailer for Doctor Who NYE episode Eve of the Daleks
Production on the 2021 New Year's Day special Revolution of the Daleks had already been completed before the pandemic struck in early 2020, but post-production had to be done remotely.
Chibnall and his team had planned for a full-length third series for Whittaker as the Doctor, but instead debuted the slimmed-down six-part continuing arc Flux in 2021.
The writer said he had to "ditch [the] original idea and write a new script in just over a week" in order to keep the show going.
The 2020 production run also included this year's New Year special Eve of the Daleks and Legend of the Sea Devils, which will air over the Easter weekend.
Those specials will be followed later this year by another episode, which will mark the BBC's centenary and also serve as Whittaker's final episode in the lead role after four years.
Whittaker's departure will also bring an end to Chibnall's tenure at the head of Doctor Who, with 2005 showrunner Russell T. Davies returning to take the reins once again.
Chibnall told Radio Times he fully expects Davies to embrace his own ideas and ignore everything that happened during his era.
He said: "It’s one of the few drama series without a written bible, and every era contains a contradiction or left-turn from what has come before. Any future showrunner will ignore it or run with it."
Legend of the Sea Devils will air on BBC One at 7.10pm on 17 April.
Watch: David Tennant says choosing next Doctor is "big decision"