On 2 January 1941, Cardiff suffered its worst air raid of the Second World War. “For over five hours,” reported the South Wales Echo, “German planes, sweeping over the city, dropped thousands of incendiaries and numerous high explosive bombs.” The intensity of the firebombing was such, noted the Times, “that it was possible to read a newspaper in the street”. That night 165 people were killed, hundreds of houses were destroyed and Llandaff Cathedral was so badly damaged that it was closed for the next 15 months.

A couple of hundred yards from the cathedral, ten-year-old Terry Nation was alone in an Anderson shelter. He was an only child. His father was in the army and his mother was an ARP warden. He spent that night and many others sheltering from the Luftwaffe’s bombs on his own, reading adventure stories and listening to incongruously cheerful programmes on the radio.

Twenty-three years later, by which time he was a journeyman writer for radio and television, Nation was commissioned to contribute a seven-part story for a proposed BBC teatime science fiction series to be called Doctor Who. But he had another job – on a variety show for the comedian Eric Sykes – so he knocked out the BBC scripts as quickly as he could. Writing an episode a day, he finished it in a week and forgot all about it. Perhaps it was the pace of the writing that enabled him so effectively to tap into subconscious fears that resonated widely. Speed helps when inventing new myths: Robert Louis Stevenson created Dr Jekyll and Mr Hyde in three days, Anthony Burgess wrote A Clockwork Orange in three weeks, Henry Rider Haggard knocked out She in six weeks.

Similarly, Nation had no time to weigh every word; he was looking only to spin a yarn. Dredging through his childhood memories of H G Wells and Jules Verne and the terror of the Blitz, he came up with the Daleks, a science- fiction incarnation of the Nazis by another name: anonymous, pitiless, killing machines, bent on genocide. They were an instant sensation when they made their debut in 1963 and, although Nation had killed them off at the end of the serial, the viewing public demanded their return. They came back the following year, when Dalekmania was the only serious rival to Beatlemania as the cultural sensation of 1964, and they’ve been coming back ever since. As Doctor Who starts gearing up for its 50th anniversary year, it’s no great shock to find the Daleks revived once more to launch the new series.

They were an unlikely success, incapable of facial expression and with restricted movement – after their first appearance an eight-year-old viewer wrote to the BBC wondering “how the Daleks get up and down the steps”. Yet they have proved phenomenally durable, scaring generation after generation of children. Endlessly reinterpreted by other writers, they exist independently of actors, and remain the ultimate baddies – resolutely evil, with no redeeming features. Very early on, political cartoonists began using them as a shorthand for screeching, monotonous intolerance. Leslie Illingworth created the “Degaullek” to represent the intransigence of the French president’s dealings with his international partners; Daleks were also seen painting the slogan “Keep Monsterland White” on the wall of Broadcasting House in a Daily Mirror cartoon at the time of Enoch Powell’s “rivers of blood” speech.

At the outset, the identification of the Daleks with the Nazis hardly needed spelling out. Most of the population had personal memories of the war and it was difficult to avoid the associations when the creatures lined up, raised their right arms in a stiff salute and announced: “Tomorrow we will be the masters of the planet.” Or when, in the second story, “The Dalek Invasion of Earth”, they rampaged through a bomb-scarred London, using humans as slave labour, until their commander issued the ultimate order: “Arrange for the extermination of all human beings – the final solution.” As time went on, the parallels became more explicit. In 1972, humans who worked for the Daleks were dubbed “quislings”. And in 1975’s “Genesis of the Daleks”, we finally met the creatures’ humanoid forebears, the Kaleds; they wore black uniforms, clicked their heels and greeted each other with a Hitler salute, jerking the forearm up from the elbow, palm out.

This was in a context in which the Second World War provided the dominant imagery shaping the national identity. By the time Doctor Who was revived in 2005, 30 years after “Genesis”, Britain was a very different place. Those who still remembered the war were now pensioners. A new shared cultural moment had been found in the memory of the Carnaby Street version of the 1960s. The opening ceremony of the London Olympics underlined the point, with its insistence that British popular culture began in the 1960s, as though rock’n’roll were invented by the Beatles.

The Daleks now fed a new nostalgia. Their reappearance was heralded on the front cover of the Radio Times with a picture of the monsters in front of the Houses of Parliament, though the image had nothing to do with the episode it was promoting. It was a recreation of a scene from “The Dalek Invasion of Earth”. In 1964, the sight of Daleks in London had drawn on fears of Nazi occupation; now it evoked the Swinging Sixties.

Images of the war were to recur, however, most notably in “Victory of the Daleks” in 2010, when the tinpot dictators appeared with Winston Churchill. But it was revealing that the Tardis had landed in 1940: this was period drama, or at least a variation on it, not a living cultural experience.

Another significant aspect of the original monsters has also disappeared. In Terry Nation’s conception, the Dalek shells had been created to house the survivors of a war that had ended with the use of neutron bombs. At the time, the idea of a neutron bomb, which had been secretly tested by the US earlier in 1963, was much talked about and Nation was part of the first anti-nuclear generation, aware of the escalating destructive power of humanity. That the Daleks’ fictional creator, Davros – introduced in the 1970s – was so strongly reminiscent of the wheelchair-bound, deranged Nazi scientist played by Peter Sellers in Stanley Kubrick’s film Dr Strangelove suggested that nuclear paranoia remained a preoccupation.

Now, stripped of such doom-laden associations, the Daleks have fallen out of favour with Doctor Who writers and many older fans. They’re seen by some as limited and simplistic. When the show’s executive producer, Steven Moffat announced last year that he was giving them “a rest”, he called them “the most reliably defeated enemies in the universe” and suggested that, having been beaten so often, they should just “trudge away”.

They’re also a bit embarrassing. Daleks have never appealed much to adults, and grown-up fans don’t always like to be reminded that they too hid behind sofas when they were kids. Above all, they’re simply too popular. The only Doctor Who monsters that are recognisable by name alone, even to those who’ve never knowingly watched the programme, they’ve always been public property, appearing in pantomimes, pornography and pulpits – even as bridesmaids in The Vicar of Dibley.

And still they can’t be written out of Doctor Who, because children continue to fall for them. Partly the appeal is that they are so easy to mimic. Tuck your elbows in, stick your arms out and squawk the word “Exterminate” – it’s much more satisfying than playing at Cybermen. And partly it’s the moral starkness of the creatures. The Daleks come from a black-and-white world in more ways than one: there’s no postmodern relativism here.

Maybe, as Who writer Terrance Dicks reflected, there’s also an element of wish-fulfilment in there as well – a fantasy that you too could get inside a Dalek “and then go down to school and blast all the teachers or blow up the school bully”. But there’s never been a truly satisfactory answer to why they were so appealing to children. “Obviously if I knew, I’d do it again,” Nation once said. “It’s a bit like asking: why is the dark scary?” observed Russell T Davies, when he brought the creatures back in 2005. “I don’t know. It just is.” But the roots of that scariness surely lie in a Cardiff bomb shelter. Just around the corner, as it happens, from where Doctor Who is now made.

Alwyn W Turner is the author of “The Man Who Invented the Daleks: The Strange Worlds of Terry Nation” (Aurum Press, £20)

A new series of “Doctor Who” begins on BBC1 on 1 September