Moffat, who has written a number of episodes of the show - including the acclaimed Blink episode which won him the writer prize at this year's Bafta Craft Awards - will replace Russell T Davies.

Davies, the key creative figure behind the Doctor Who revival in 2005, stands down next year.

The appointment makes Moffat Doctor Who's showrunner - the key creative force behind the programme - on the fifth series, which will be broadcast on BBC1 in 2010.

As well as Blink, his previous work on Doctor Who includes The Girl in the Fireplace for series two which earned him his second Hugo Award. His first was for the series one two-parter The Empty Child.

Davies said: "It's been a delight and an honour working with Steven, and I can't wait to see where his extraordinary imagination takes the Doctor. Best of all, I get to be a viewer again, watching on a Saturday night!"

For the current series, Moffat has written Silence in the Library, a two-parter starring Alex Kingston that transmits later this month on BBC1.

Moffat said: "My entire career has been a secret plan to get this job. I applied before but I got knocked back because the BBC wanted someone else. Also I was seven.

"Anyway, I'm glad the BBC has finally seen the light, and it's a huge honour to be following Russell into the best - and the toughest - job in television."

Davies and Julie Gardner, the BBC Wales head of drama, have worked on the fourth series of Doctor Who and are working on four specials for broadcast in 2009.

In 2009 BBC Wales, which makes Doctor Who, will also have a new head of drama when producer Piers Wenger takes over from Gardner.

The BBC fiction controller, Jane Tranter, said: "The Tardis couldn't be in safer hands. Steven's talents on both Doctor Who and beyond are well known.

"He is a writer of glittering brilliance, comedy and depth, with an extraordinary imagination and a unique voice.

"Steven has a wonderful mix of being a committed Doctor Who fan and a true artist, and his plans for the next series are totally thrilling."

Moffat's career began with the ITV children's drama Press Gang in 1989 and he also wrote the sitcom Coupling for BBC2 that ran for four series from 2000.

Moffat also wrote the six-part BBC1 series Jekyll starring James Nesbitt and Michelle Ryan that screened last year.

Moffatt will continue as one of the directors on the board of Hartswood Films which produced Coupling and Jekyll, and for which he is also developing a new comedy Adam & Eve.

· To contact the MediaGuardian news desk email editor@mediaguardian.co.uk or phone 020 7239 9857. For all other inquiries please call the main Guardian switchboard on 020 7278 2332.

· If you are writing a comment for publication, please mark clearly "for publication".