Sherlock: how it became a global phenomenon If Conan Doyle's detective were called in to examine the artefact that Sherlock has become; to read it like one of those mystery objects from the stories - a battered fob-watch or a felt hat smeared with lime-cream - what other clues would he find to the extraordinary nature of its success? From his files, he'd pull out a newspaper report about the potter who'd made a fortune because a teapot of her design was chosen as the preferred kitchenware of Una Stubbs's Mrs Hudson; an online story about the Chinese inventing a whole subgenre of online pornographic writing about Benedict Cumberbatch; a tweet from Sue Vertue, Sherlock's lead producer, sharing her suspicions about Elementary, a copycat series created by a US network. Then he'd hack into the BBC online previews website and find his access to the Series Three opener - The Empty Hearse - prefaced by a list of caveats and warnings longer than the Musgrave Ritual. Cumberbatch and Freeman as Sherlock and Watson In turning over the Series One box-set in his hands, however, Holmes would certainly note the speed of Moriarty's arrival - and conclude from this, perhaps, that the programme-makers were unsure of how long they would have before their toys were taken away from them... In the person of Andrew Scott, Moriarty has played no small part in the show's success. But to truly understand why Sherlock has been so popular, one has to go back to the very beginning. To Sherlock Holmes, the world is a puzzle waiting to be solved; a mass of data from which the truth - however improbable - can always be isolated. The roots of this approach lie in the work of Dr Joseph Bell, the Edinburgh University surgeon who taught his students how to read the human body - to use a callus or a tattoo to yield the biography of a living patient or a cadaver on the slab. Bell's student, Arthur Conan Doyle, knew his methods, made a gift of them to his detective-hero and practised them himself - in the surgery, and at the spirit-rapping table. If empirical reasoning could detect a murderer, why not the presence of a wandering soul? Adaptors of Holmes have rarely tampered with this facility. The Seven Percent Solution, the 1976 film that depicts Holmes as a drug fiend and Professor Moriarty as the innocent victim of his delusions, is a lonely exception. The greatest Holmes of the silent screen, Eille Norwood, shaved his temples to make himself look more cerebral, and found himself in demand as a cryptic crossword-setter and the paid advocate of Phosferine, a tonic that claimed to combat "neuritis" and "nervous debility." When Universal brought Holmes back to the screen in the 1940s, they prefaced the first few films with a title-card explaining that the detective was now working on "the problems of the present day" - which were not forced marriages or suburban poisonings, but Nazism and Fascism. Basil Rathbone cracked totalitarianism case by case, exposing Haw-Haws and fifth columnists in a wartime England confected on a Hollywood sound stage. Guy Liddell of MI5 took great exception to the idea that in comparison to Holmes, British spies were as flat-footed as Scotland Yard detectives. Gatiss has enormous respect for Holmes's ability to understand the world's complexity. "I believe very strongly," he says, "that one of the reasons why Sherlock Holmes and Dr Watson have survived so long is not just because of their immutable friendship, it's because Sherlock as a character brings order to chaos. That's the consolation he provides. And Gatiss sees similar qualities in the role he has assigned himself in the drama - Sherlock's brother Mycroft, the fastidious state spymaster. He's the British government version of the same idea. You suspect that there's only stupidity and incompetence, but wouldn't it be nice to know that there was someone like that there? Never has this sense that Holmes is a master of data been more brilliantly portrayed than in Sherlock. I had the good luck to be on the set of the very first episode to see Benedict Cumberbatch perform one of his set-piece deductions: the figurative unpacking of a pink suitcase that has the story of a murder inscribed upon it. Una Stubbs and I crouched in the doorway of the Baker Street set, mesmerised, and quite unable to take a bite from the jam doughnuts we'd taken from the tea trolley. Cumberbatch was lying on his back like a customer in an opium den, with the camera gazing into those strange black eyes of his, and unwinding a long skein of words with arresting speed and clarity. If you saw A Study in Pink, you'll recall the scene. Its faintly occult quality was palpable on the studio floor. One of the keenest pleasures of Sherlock is the graphic language it has developed to illustrate the deductive process. There's a cracking example in The Empty Hearse, during a scene in which Sherlock encounters a new and significant female addition to the cast. As he looks her over, his gaze releases a cloud of words into the frame: "Only Child. Disillusioned Lib Dem. Guardian. Bakes Own Bread. Older screen Holmeses went into a brown study; Cumberbatch's version searches through a huge internal database for the idea that, however improbable, must be the truth. And it's impossible to watch him drawing information from the atmosphere like this without thinking of our preoccupation with the collection and analysis of data - particularly as the series offers a deeply ambivalent view of the secret state. Little wonder that Cumberbatch was cast in a biopic of Julian Assange. This series of Sherlock was safely scripted before Edward Snowden appeared on the world's front pages, but the comparison between the whistleblower and the detective - both the carriers of vast palaces of secrets - hasn't escaped Gatiss. I haven't done it yet. But that'd be very interesting. That's a story about people working with huge amounts of data, in which the role of the amateur has been called into question. Anyone spinning stories about a figure who gathers great swathes of information, keeps people under surveillance and declares that plots and conspiracies are always revealed by events that are "seemingly insignificant" might find it hard to insulate their work from current debates about freedom, privacy and secrecy. After all, the hero of Sherlock is both a spy and a dissident. And when these adventures are as old as Basil Rathbone's, we might find ourselves seeing in them the fears and fantasies of the present day, as legible as clues at a crime-scene. Millions watch the series because it's witty, smart, moving and clever. But we're also watching Sherlock because it is a product of the age in which we live - and seems to know its secrets, too. Sherlock returns on BBC One on New Year's Day at 9pm