Fans sometimes talk about Doctor Who‘s infinitely flexible format. This is the show which can go anywhere and do anything. When an anniversary year comes around though, we discover this isn’t as true as we might like to think.

It’s all the fault of The Three Doctors really. It laid down a template for anniversary stories which ever since has been too good to resist. Multi Doctors, uniting against one enormous threat. Then The Five Doctors took it even further. Returning Doctors plus returning companions and lots of returning monsters.

The reunion episode is a TV staple and on any other show, you could do it as often as you like. On ordinary shows, characters can age, and you can pick up with them years after their last TV appearance. You find out what ever happened to them, you try to guess which ones have had plastic surgery, it’s all good fun.

But Doctor Who can’t do that because each of the Doctors is meant to be ageless. We saw each of them turn into another of them, before they got old and creaky. Reunion shows doomed forever. Flexible format, my foot! The Day of the Doctor is bogged down in a format it inherited from Old Who and which was, by 2013, almost impossible to use.

Because here’s the problem. What other possible shape could the show’s 50th anniversary episode take? It’s very difficult to imagine it not being a multi Doctor story, because that’s what Doctor Who anniversaries are. And it’s inconceivable that it wouldn’t at least acknowledge each actor to play the title role.

Steven Moffat knew this. More than that, he wanted this – and more. He wanted every Doctor joining forces with himself to save Gallifrey from the Daleks. It’s testament to his ingenuity and determination that he made this happen. Despite three Doctors being stubbornly dead, four looking significantly different to their Doctorly prime and one flatly refusing to participate.

But that Moff is clever. He takes an impossible format and makes it work. How did he do it?

First, he makes this a story about the Doctor and the biggest day of his life. Think of how different an approach this is to The Three and Five Doctors, where the multiple Doctors simply come out to play, just to have an adventure. Setting this story on the last day of the Time War gives it an event worth watching and makes it more than just a chance to watch rival Doctors squabble. It’s an event big enough for this biggest of episodes.

Secondly, John Hurt. Every anniversary story’s been short its full quota of Doctors and each has come up with inventive ways around the problem. But Moffat’s is the most audacious. Without Christopher Eccleston, he needs a Doctor upon whom to shoulder the story’s moral weight – the redemption of the Doctor post his Time War atrocity. At a pinch, it could have been Paul McGann. But in search of a marquee name to hang out the front his 50th anniversary, the Moff creates an entirely new and hitherto unheard of Doctor and has him played by a movie star.

Think the Doctor is a tough role to play? Pah, step aside children. Hurt is instantly right in the part, creating, as McGann did 17 years earlier, a fully formed Doctor in about an hour. There’s a lovely bit somewhere in all the associated behind the scenes material about this story, where Doctors Smith and Tennant giggle like naughty schoolboys about their own acting deficiencies compared to Hurt. Smith says he’s busy pulling faces like mad, when all John Hurt has to do is look and the shot’s in the can.

It would have been great to have Eccleston back. But if he hadn’t said no, we wouldn’t have got Hurt. And it gives The Day of the Doctor the chance to say something new about its lead character; that there was a time when he strayed from the path and became everything a Doctor shouldn’t be.  It’s another way in which Moffat breathes life back into the anniversary show format, by asking that question he loves to ask: Doctor Who? Who is this man and what has shaped him? It’s more introspective than any other multi-Doctor stories to date.

Finally, he plays fast and loose with the structure of a Doctor Who story. You’d be well within your rights to expect a villain of some sort to turn up in the biggest Doctor Who story ever. You might be wondering where the final showdown is, with the Doctors squaring off with some big arse Time Lord baddy, as per Three and Five. Instead Moffat gives us two alien invasions – the Zygons on Earth and the Daleks in the skies above Gallifrey- but boldly keeps these on the sidelines. The main question posed is not, “will the Doctors win?” but “can the Doctor heal himself?”

The answer turns out to be, “yes, but only if we completely retcon the new series”. Moffat is unafraid of such bold, sweeping moves. In The Big Bang, he completely reverses the whole of Series 5. In The Wedding of River Song, he negates an alternative timeline. He’s used to travelling back to a crucial point in history and just changing it. Time, remember, can be rewritten.

So in one fell swoop, he changes the outcome of the Time War, saves Gallifrey from destruction and absolves the Doctor of his crimes. It’s a resetting of the show along the lines of the classic series. The Doctor’s no longer a war criminal, Gallifrey’s in the heavens and all’s right with the world. Plus he manages to rope in all thirteen of the Doctor’s to help, in a smorgasbord of archive footage, vocal impersonations and impressive eyebrows.

Oddly enough though, here he’s on much more traditional anniversary story ground. The Three Doctors ended with the end of the Doctor’s earthly exile. Reset! The Five Doctors ended with the Doctor on the run from his own people again. Reset! And here, a new start, unburdened by the weight of the Time War, which the series has dragged around since 2005.

All delivered in 3D, in cinemas and a guest appearance by Tom Baker. So hats off to the Moff. Upon being told there were no toys left in the toybox, he held a kickass party anyway. And rewrote Doctor Who along the way. Yeah, that’s how he did it.

LINK TO Resurrection of the Daleks: the Dalek invasion of Gallifrey threatened in Resurrection finally happens.

NEXT TIME: The Beast and his armies shall rise from the Pit to make war against God. We do the Devil’s work with The Impossible Planet/The Satan Pit.