Image caption William Hartnell (right) in a scene from the first Doctor Who story, An Unearthly Child, in 1963

A special one-off drama about the creation of Doctor Who has been commissioned to mark the show's 50th anniversary.

An Adventure in Space and Time will tell the story of the genesis of the BBC sci-fi show in the early 1960s.

"This is the story of how an unlikely set of brilliant people created a true television original," said its writer Mark Gatiss.

The 90-minute drama will air on BBC Two next year.

Gatiss said the drama would also examine how actor William Hartnell - who played the first incarnation of the Doctor - moved from hard-man roles to become "a hero to millions of children".

"I've wanted to tell this story this for more years than I can remember! To make it happen for Doctor Who's 50th birthday is quite simply a dream come true," he said.

Steven Moffat, Doctor Who's executive producer, said: "The story of Doctor Who is the story of television - so it's fitting in the anniversary year that we make our most important journey back in time to see how the Tardis was launched."

Further details about the production, including the casting, will be confirmed next year.

Doctor Who was first broadcast on 23 November 1963 with a four-part adventure known as An Unearthly Child.

The show was originally commissioned by the BBC's head of drama Sydney Newman, and produced by Verity Lambert.