As the sci-fi franchise reaches the half-century mark, it’s important to remember the heady ideas and political commentary that made it resonate, writes Trekkie Natalie Haynes.

In 1968, US television broadcast what many claim was the first interracial kiss on American airwaves. It occurred between two of the sexiest characters alive: Captain Kirk and Lieutenant Uhura, on Star Trek. According to Nichelle Nichols, who played Uhura, “We received one of the largest batches of fan mail ever, all of it very positive, with many addressed to me from girls wondering how it felt to kiss Captain Kirk, and many to him from guys wondering the same thing about me.

Star Trek’s creator wanted audiences to know that by the 23rd Century tolerance is the norm

But the taboo-busting kiss was far more troubling than most people remember, not because of its colour-blindness but because of its motivation. Kirk and Uhura do not kiss one another from choice. Rather, they are compelled to do so by a psycho-kinetic alien villain, Parmen, who revels in their mutual discomfort. At the same time as this kiss is being forced upon its unwilling participants, Trek fans were also coping with an unwanted smooch between Mr Spock and poor Nurse Chapel, who is writhing from the humiliation of kissing a man (and a Vulcan at that) to whom she has long been attracted. The sadism of Parmen, forcing friends into pseudo-sexual behaviour, reaches its climax in this scene: moments later, Kirk develops the necessary telekinetic power to retaliate.

But however unwanted the kiss is (and this episode, Plato’s Stepchildren, is consistently unsettling, as our heroes lose control of themselves in increasingly traumatic and degrading ways), the message for its audience is undeniable. When Kirk discusses his predicament with Alexander, a small person who is mistreated by the sadistic aliens, he explains, “Where I come from, size, shape or colour makes no difference.” In other words, by the 23rd Century, tolerance is the norm. And Star Trek creator Gene Roddenberry was determined that his audience would realise this. To quote Nichols again, “He didn’t talk about it, he just did it. It was who he was. He believed in that world, if you got it you got it. If you didn’t get it, you’d see it anyway.”

It’s a neat summary of the allegorical complexity of Star Trek: if you get the subtext, you get it. If you don’t, you just see the surface story. Whenever Roddenberry or his writers had a political point to make, they tended to use allegory as their best way to get that point across. One of the joys of Star Trek is that our crew is constantly exploring, constantly curious. So there is always a planet, a species, a story which can throw its illuminating light upon the less exotic world of the earthbound viewer.

Where no man has gone…

There can be few more weary depictions of the futility and self-destruction of civil war than we see in the original series episode Let That Be Your Last Battlefield. The Enterprise plays unwilling host to two aliens, each the mirror image of the other: half his face is black and half is white. To the Enterprise crew (and the viewers) these men look the same, half-black and half-white. But the aliens can only see the difference between each other: that the black and white halves are on opposite sides of their enemy’s face. By the time the crew reach the men’s home planet, they are unsurprised to discover that hatred has trumped self-interest to a lethal degree. The two men are now the sole survivors of their respective races. And anyone hoping for a happy ending is disappointed: their enmity is as implacable at the end of the episode as it was at the beginning. Hatred is, as Kirk says, “all they have left”.

All science fiction is telling two stories: about the world in which it is set and the world in which it is written

All science fiction is telling two stories: about the world in which it is set and the world in which it is written. And the burdens of 20th Century America lie heavily in the Star Trek universe. It was one of the earliest shows to dramatize the Vietnam War, however obliquely, while the conflict was ongoing, in A Private Little War in 1968. Allegory gave the writers the chance to talk about the moral complexity of a contemporary war without being seen to be unpatriotic. The same trick would be brilliantly employed by the writers of the TV show, M*A*S*H, who ostensibly set their drama during the Korean War while making it sometimes uncannily close to the conflict in Vietnam.

But M*A*S*H  came four years after viewers watched Kirk and McCoy, the Enterprise’s doctor, visit Neural, a planet where Kirk had lived some years earlier and had described as an Eden inhabited by an innocent, pacifist society. On his return, he discovers that the Klingons have been arming one set of villagers with guns – against the Prime Directive, which prohibits interference in alien civilizations which have yet to achieve the technological development of space travel – and Kirk ends up arming his old friend, Tyree, to maintain the balance of power. He is partly tricked into this by Tyree’s sorceress wife (the geo-politics of 1960s Star Trek is occasionally light years ahead of its gender politics, and Nona is a sexually-exploitative witch-like character who would not be out of place in Homer’sOdyssey).

At one point, Kirk explicitly refers to the “20th Century brush wars on the Asian continent”, as he and McCoy argue about the right course of action. The episode comes down in favour of arming more people, but it poses questions which the audience must have shared: what happens when two super-powers fight their wars by proxy, though another society altogether? And where does that end? While the characterisation of Neural’s inhabitants as noble savages is rather simplistic, the programme still offers a powerful critique of US foreign policy. Not least because the criticism is voiced by Dr McCoy, who is so often the voice of caution on the Enterprise.

The road from legitimate suspicion to rampant paranoia is very much shorter than we think – Jean-Luc Picard

Taking war to its logical conclusion provides Star Trek with another of its most iconic episodes: A Taste of Armageddon. The Enterprise finds a planet where a centuries-old war is conducted algorithmically: computers calculate who would die, if real bombs were detonated, and instead of the bombs actually falling or a war taking place for real, the unfortunate casualties instead walk into a disintegration chamber. It is an allegory within an allegory for the appalled Captain Kirk: the participants never make peace because they have this strange proxy-war, where the death toll mounts but infrastructure remains intact. War should be real war, not a simulation thereof, if it is ever to come to an end.

Beaming up politics

And the horrors of the Cold War are never too far beneath the surface of any Trek iteration. McCarthyism is the theme of the 1991 Next Generation episode, The Drumhead, in which we face the question of what it means to be innocent if an authority figure believes you to be guilty. And perhaps more troublingly, how quickly the contagion of guilt infects anyone who stands up for that innocent person. So when a Romulan spy is found on the Enterprise after an explosion (believed to be sabotage), a hunt is quickly established to find his partner in crime. But as Captain Picard says, “The road from legitimate suspicion to rampant paranoia is very much shorter than we think.

It is all the more surprising to think this episode was made before 9/11

Terrorism is carefully treated in Star Trek’s most serious-minded offshoot, Deep Space Nine. They interrogate the problem of terrorist shape-shifters, who can resemble anything and have a powerful desire to kill, in the episode Homefront. It is all the more surprising to think this was made before 9/11, when the notion of the terrorist who seems to be an ordinary person, but is plotting mass murder was still unfamiliar to most viewers.

One of the most memorable episodes of Deep Space Nine deals with the aftermath of a war crime. Duet follows the trial of a Cardassian who has a medical condition which could only have been contracted if he had been at the site of a terrible war crime. But is he who he first claims to be: an innocent filing clerk?  Or is he one of the architects of mass murder? Or, the programme asks, is there no difference between these two? The episode was first broadcast in 1993, a year into the Bosnian War.

So if Star Trek’s writers were using allegory to reveal as much about the 20th Century as the 23rd, did they want us – the viewers – to notice that’s what they were doing? Or were they simply trying to sneak ideas past programme-commissioners who might have blanched if they had seen the political subtext of these shows laid bare? The Next Generation episode Darmok suggests that the writers wanted us to notice their use of metaphor and allegory; they make the entire plot depend on it. Picard finds himself isolated on a planet with Dathon, an alien Tamarian whose language he cannot understand. Not because the words themselves don’t make sense to him, but because their meaning is too opaque. “Darmok and Jalad at Tanagra,” says Dathon, throwing Picard a knife. Is he picking a fight? Picard is at a loss. “Temba, his arms wide,” adds Dathon. What can he mean?

Eventually, Picard and his crew realise that Tamarians communicate through metaphor only. The story of Darmok and Jalad is a parallel of Gilgamesh. Only by understanding the power of allegory can Picard understand the Tamarians. And only by appreciating the power of allegory can we appreciate the complexity of Star Trek.

If you would like to comment on this story or anything else you have seen on BBC Culture, head over to our Facebook page or message us on Twitter.

And if you liked this story, sign up for the weekly features newsletter, called “If You Only Read 6 Things This Week”. A handpicked selection of stories from BBC Future, Earth, Culture, Capital, Travel and Autos, delivered to your inbox every Friday.