A scene from the first season of “Doctor Who,” in 1963, with William Hartnell as the Doctor, outside the Tardis, his time-and-space ship. Courtesy BBC

Behind the door labelled Studio Four, where “Doctor Who” is filmed, it smells of glue and paint. Industrial-gauge steel chains hang from the ceiling, which is painted black and is so impossibly high that it feels more like a night sky than like the underside of a roof, the chains like falling stars. The only light is artificial, slanted, and green. The concrete floor is speckled and spattered. Surrounding the set, cameras, lights, and microphones stand on tripod legs of smeared chrome like an army of giant arthropod invaders, patiently waiting. In the stillness, a stagehand wearing a black hooded sweatshirt and black cargo pants rummages through a Tupperware storage box, making an awful clatter. He pulls out something metal and rusted, cradling in his tattooed hands the part that would roll away if you were to guillotine a robot. “This, this,” he mutters in quiet triumph, “is the head we need.”

“Doctor Who” is the most original science-fiction television series ever made. It is also one of the longest-running television shows of all time. (Virtually every other marathoner is a soap opera.) It was first broadcast in 1963, three years before “Star Trek,” and, with apologies to Gene Roddenberry, is smarter and, better yet, sillier. The U.S.S. Enterprise, for all its talking computers and swooshing doors, is a crabbed and pious Puritan village; Doctor Who tumbles through time and space in the Tardis, a ship that from the outside looks like an early-twentieth-century British police box, painted blue and bearing a sign on its door that reads “POLICE TELEPHONE. FREE FOR USE OF PUBLIC. ADVICE AND ASSISTANCE OBTAINABLE IMMEDIATELY.” Inside (it’s bigger on the inside), the Tardis has something of the character of the reading room of the British Library, if the British Library had a swimming pool and were a pub designed by someone who adored Frank Gehry, Lewis Carroll, and typewriters with missing keys.

On November 23, 2013, “Doctor Who” will celebrate its fiftieth anniversary with a seventy-five-minute, 3-D special called “The Day of the Doctor,” which BBC Worldwide is billing as a “global simulcast,” meaning that it will be seen at the same time in almost eighty countries—a new frontier in the history of television. For many people around the world, “Doctor Who” is the face of the BBC. At the height of its first run, which ended in 1989, “Doctor Who” was seen by a hundred and ten million viewers in fifty-four nations, including the United States, where, beginning in the nineteen-seventies, it was broadcast by PBS and watched by the kind of quisling American kid who hadn’t the heart for “Happy Days.”

“ ‘Doctor Who’ is the story of a lovely world in which a kind man saves everyone from harm,” Steven Moffat says. Moffat, a fifty-one-year-old Scot, started watching “Doctor Who” when he was a little boy and is now its executive producer and head writer. He says that it has two things: “scary monsters and a funny doctor.” Every week, it’s the same: the Tardis lands; the funny doctor pops out; he meets scary monsters; and then he defeats them, because he is very, very clever.

From the start, “Doctor Who” was meant to be a “loyalty program,” a show that people reliably tune in to every week. Lately, TV people schedule around what is known as “event television,” and it’s not necessarily a weekly affair; instead, it’s often a one-off, like the instant-to-Internet Netflix release, earlier this year, of all thirteen episodes of the first season of the American adaptation of the BBC’s “House of Cards.” “Doctor Who” began as family television: a show that kids and their parents and grandparents can all watch, maybe even together, on the sofa. But the industry term “3G TV” doesn’t mean television enjoyed by three generations of your family; it means television you can watch on a mobile telephone with third-generation wireless data service. “Doctor Who” is BBC Worldwide’s top-selling iTunes download. In the United States, “Doctor Who” airs on BBC America, but here and around the world viewers watch the series on platforms that defy programming schedules and that don’t require families or sofas, or even TVs.

The fiftieth anniversary of “Doctor Who” marks an end to an era in the history of television: the end of the age of the box. In 1999, when “Doctor Who” was off the air (if thriving in fan fiction) Moffat wrote a spoof called “Doctor Who—The Curse of Fatal Death,” starring everyone from Rowan Atkinson to Hugh Grant, in which one character tells the Doctor, “You’re like Father Christmas, the Wizard of Oz, and Scooby Doo!” But Doctor Who is also Great Britain. The world’s longest-running science-fiction television series is, among other things, a fable about British history: the Doctor halts every invasion and averts every atrocity, except when he can’t. Doesn’t that story ever get old?

“An Unearthly Child,” the first episode of “Doctor Who,” was broadcast—live, in black-and-white—from a BBC studio in London on November 23, 1963, one day after John F. Kennedy was shot in Dallas. The BBC had never before done anything like it.

“Doctor Who” was the brainchild of Sydney Newman, a Canadian who became head of the BBC’s drama department in 1962. Newman, who’d created “The Avengers,” for ITV, in 1961, was brought in to produce television that could meet the BBC’s remit as a government-owned broadcasting service as well as its need to win viewers from ITV, a commercial rival that had begun broadcasting in 1955. By 1960, the BBC had not a single program among the top ten ratings earners. Newman had an idea for something that could be both educational and entertaining: science fiction. His department commissioned a report on the state of the genre. It proved discouraging. “Several facts stand out a mile,” the report began. “The first is that SF is overwhelmingly American in bulk.” Also, “SF is not itself a wildly popular branch of fiction—nothing like, for example, detective and thriller fiction.” In particular, “It doesn’t appeal much to women.” Then, too, “SF is largely a short story medium,” in which, as Kingsley Amis had pointed out, the heroes are ideas, not people, and the ideas are often “so bizarre as to sustain conviction only with difficulty over any extended treatment.” In other words: adapting for television an existing work of science fiction was impossible and hiring any science-fiction writer inadvisable.

Newman decided to flout the genre’s conventions. In a flurry of memos (now stored in the BBC’s archives in Reading), members of his staff explored the possibilities. “The essence of S.F. is that the wonder or fairytale element shall be given a scientific or technical explanation,” one reported. “To do this there must be at least one character capable of giving the explanation.” It might not be a bad idea if this character were to have something “of the feeling of Sherlock Holmes.” But, if so, he ought to have a female Watson, because “S.F. is deliberately unsexual; women are not really necessary to it”—and so it would be wise to “add feminine interest.”

A time machine was first suggested at a meeting held on March 26, 1963. From an educational point of view, this device had a significant advantage: a hero who travels through time and space can offer lessons in both history and science. “Doctor Who” is distinctly British, and indebted to H. G. Wells. It was also influenced by the 1951 Hollywood film “The Day the Earth Stood Still,” in which an alien who travels with a shiny metal robot lands a flying saucer on the Washington Mall, in the hope of ending war on Earth. But the series, as it developed, was meant to appeal to women as much as to men, to adults as much as to children, and to revolve around a hero who is a fully realized dramatic character, not a disembodied idea. A flying saucer was proposed and rejected. “Bug-Eyed Monsters” and “Tin Robots” were discouraged (a suggestion not always honored). And a narrative structure was adopted that allows not only for extended but for infinite treatment.