He is sometimes referred to as "The Moff", this inventor of scary monsters who has pitted the Time Lord against the Weeping Angels, a murderous breed of statuesque aliens, and the Smilers, a race of grimacing androids that resemble Steven Berkoff clones dressed as choirboys.
Steven Moffat is the executive producer of Doctor Who and its leading – and by far its darkest – writer. He is also the co-creator of Sherlock, which, especially ahead of the Christmas schedule, makes him one of the most powerful figures in British television and one of the BBC's most important creative talents. He is a tall and burly Scotsman with a reputation for being unconventional. And, as a lifelong Doctor Who fan, he is unapologetic for forcing a new generation of children to seek refuge behind the sofa. "Doctor Who is how we warn our children that there are people in the world who want to eat them," he asserted last year.
Moffat's great talent is mixing menace with wit. He was the writer of the award-winning comedy series Coupling and the bittersweet sitcom Joking Apart, both of which drew from the ups and downs of his personal relationships. As the lead writer of the screenplay for the Steven Spielberg-directed film The Adventures of Tintin, Moffat is nominated for an award at next month's Golden Globes.
He was born into a family of teachers just over 50 years ago, and, although he abandoned his own teaching career after only three years, he is instinctively didactic. "He used to be an English teacher and he still carries with him a great patience and a brilliant ability to spread knowledge around in a very democratic way," says Mark Gatiss, co-creator of The League of Gentlemen, and the man with whom Moffat dreamed up the idea of a contemporary Sherlock Holmes.
Moffat owes his first break in television to his headmaster father, Bill, who hosted an edition of the Harry Secombe ITV show Highway at his school and took the opportunity to pitch an idea for a TV format. Mr Moffat insisted that his son should write the draft script for a children's drama about a school newspaper, Press Gang.
The show, set in the mythical town of Norbridge and starring a young Julia Sawalha, was a breakout hit and gave Moffat the opportunity to pursue professionally an interest in television production that he had explored while a student at the University of Glasgow. But though Press Gang brought Moffat his first Bafta, its five series also coincided with the breakdown of his first marriage. Learning that his love rival was a fan of the show (which like the modern Doctor Who included many adults in its audience), Moffat dryly noted: "Well, did he have to fuck my wife? Most people just write in", and took revenge by creating a hapless character for the series, modelled on his nemesis.
Moffat – who by his own admission was "irritating" and "bloody opinionated" at this stage of his life – continued with this maudlin humour in Joking Apart, a show about a television sitcom writer going through a messy divorce. Although he later described the show as "feel-bad comedy", he was proud of its originality. "It's the show's strangeness which made me fonder of it," he told the comedian Richard Herring in an interview in the mid-Nineties. "It's good and innovative. It's just not likeable."
Herring regarded the man in front of him as "unflashy, casually dressed" but "there is a quirkiness about him". He observed: "Like his scripts, his outward conformity quickly reveals a naughty non-conformity."
Moffat's world was transformed 15 years ago at the Edinburgh Television Festival when he began a relationship with The Vicar of Dibley producer Sue Vertue, who would become his second wife. Prior to that, he had "shagged my way round television studios like a mechanical digger", as he told The Scotsman last year.
The couple created the hit series Coupling, made by Sue's mother Beryl's company, Hartswood Productions, a show about the dating arrangements of a group of thirty-somethings. Lighter than some of Moffat's previous work, it was named Best Comedy at the British Comedy Awards in 2003 and ran for four series. But Moffat was frustrated that what he saw as studio interference in the creative process undermined an American version of the show, which was dropped by NBC after only a few episodes.
He has voiced "doubts about my place" in a directory of funny British scriptwriters. "I think of myself as a writer with a sense of humour rather than a comedy writer. Happy to tell a story with lots of jokes in it – I wouldn't know how to do jokes without the story."
When the chance came to write for a revitalised Doctor Who, Moffat pushed himself forward. A dedicated "Whovian", he claims to remember watching the first Doctor, William Hartnell, who quit the Tardis when Moffat was four. But some of those who admired Coupling were scornful of his decision, recalls Gatiss, who is also a Doctor Who writer.
"I remember people throwing up their hands in horror at the notion of Steven writing for Doctor Who," he says, pointing out that Terry Nation, the inventor of the Daleks, had also been a scriptwriter for Tony Hancock.
"Steven is just a brilliant writer and that means he can turn his hand to comedy and tragedy and everything in between," says Gatiss. "He's always surprising and his greatest gift is to be able to pull the rug from under people's expectations."
Although Russell T Davies took the limelight as the lead writer of the new Doctor Who, ardent fans began to notice that some of the smartest and brilliantly twisted scripts were emanating from Moffat's pen. His first three submissions were all hugely popular. "The Empty Child" took the Doctor and Rose on a gas-masked journey back to the Blitz. "The Girl in the Fireplace" was a love story for the 10th Doctor, David Tennant. "Blink" chilled young viewers with the sight of the Weeping Angels.
Davies acknowledged his colleague's talent in a speech in London. "I'll re-write 100 per cent if I have to [but] with Steven Moffat's scripts, I don't touch a word, but anyone else's I do..." By 2007, Davies was sounding Moffat out about taking on the lead writing role. Since taking the job as executive producer, he has hired Matt Smith in the starring role, the youngest-ever doctor.
Other offers have come in for The Moff. Spielberg pursued him doggedly to write The Adventures of Tintin, although his responsibilities to the BBC mean that he is not able to script the sequel. He made the BBC1 drama Jekyll, a modern take on the Robert Louis Stevenson classic.
Then on train journeys from London to Cardiff to work on Doctor Who, Moffat and Gatiss began discussing A Study in Scarlet, the novel in which Arthur Conan Doyle, then a Portsmouth GP, introduced readers to Sherlock Holmes. Gatiss mentioned how the book opens with Dr Watson returning from war in Afghanistan and the pair agreed that the time was ripe for a contemporary adaptation. Sherlock, which stars Benedict Cumberbatch and Martin Freeman, begins its second series next month.
A Doctor Who Christmas special, "The Doctor, the Widow and the Wardrobe", will be shown on Christmas Day, as is noted on a tribute website: "The Moff: Thrilling adventures in time, space and Norbridge."
Moffat is the father of two small boys who have become his sounding board when writing. Russell T Davies told him that "parenthood" had become his chief preoccupation as a writer. Gatiss doesn't disagree.
"The boys have grown up as the ideal testing ground as Doctor Who has developed," he says. "Children's preoccupations and what it means to be a good parent shine through in an awful lot of Steven's work."
A life in brief
Born: Steven Moffat in Paisley, Scotland, 18 November 1961.
Family: Married to producer Sue Vertue, with whom he has two sons.
Education: Camphill High School; University of Glasgow, MA in English.
Career: Worked as a teacher before he began writing plays. His first TV series was Press Gang (1989-93); he has also scripted Coupling, Chalk and Sherlock. He has been Doctor Who's lead writer since 2009.
He says: "The way you get your script to the right people is that you put it in an envelope. It's easy. The difficult bit is writing something that is so good people will take a punt on a brand new writer."
They say: "He's a genius. And you get all these things that come with being a genius; he's pretty weird. But I love him. He's one of the funniest people I know." Matt Smith, Doctor Who star