It may seem hard to believe, but cult TV favourite Red Dwarf celebrates its 30th anniversary today.
Thanks to creators Rob Grant and Doug Naylor's sharp, witty writing, and the consistent charisma of its stars, the sci-fi sitcom became one of the most widely loved comedies in history.
There have been numerous great episodes of course, from 'Backwards' to 'Polymorph'.
But few instalments of any comedy show have had the enduring, universally-loved appeal of 'Gunmen Of The Apocalypse'. A Wild West caper in space, with the swagger to match.
Fistful of Dollars meets The Matrix
First broadcast in 1993 as part of series six, and celebrating its own 25th anniversary this year, 'Gunmen' manages to be a hilarious sitcom episode, a nail-biting sci-fi thriller and a love-letter to classic Hollywood westerns - all in one half-hour of television.
Red Dwarf is often at its best when seizing on an inspired set-up from the near infinite possibilities of its space-faring, alien-marauding universe. And 'Gunmen' has one of the most tantalising.
After barely surviving a run-in with a ship of merciless, human-hating AIs known as Simulants, the crew's own vessel, 'Starbug', is infected with the formidable Armageddon virus.
Android Kryten begins fighting a losing virtual battle with the virus; represented as a Wild West nightmare in which his town is besieged by the titular horsemen: Death, War, Famine and Pestilence.
Realising they need to intervene to help him, Cat, Lister and Rimmer enter Kryten's dream state with the aid of a handy VR video game machine.
It's Fistful of Dollars meets The Matrix (six years before the latter film's release).
Cowboys and comedy
Serving up a genuine slice of cinematic tension alongside the comedy, what follows is a race-against-time to save the ship and its crew, and an opportunity to parody any number of Western clichés.
There's the bar fight (taking place, appropriately enough, in 'The Last Chance Saloon'). The washed-up, over-the-hill Sheriff who must raise his courage to face down one last threat.
And the Red Dwarf crew re-imagined as a deadly posse of cowboys. Something of a Magnificent Three, at least until they lose their special gaming abilities.
So we get to witness the wonderful spectacle of layabout Lister nonchalantly flicking an apple into a thug's open mouth, the usually cowardly Rimmer duking it out with his fists, and - best of all - Cat showing off his full flamboyant flair as The Riviera Kid (cue guitar flourish); shooting a gunslinger's bullets clean out of the air and, in a moment of great visual comedy, ricocheting a bullet off various surfaces in order to incapacitate Kryten.
Speaking of which, the comedy itself is on point throughout, despite the story mustering genuine dramatic tension (not least the Hollywood tradition of a second-act 'low point').
From the opening minute until the credits roll, the laughs come thick and fast.
The culmination of the Red Dwarf formula
There's Lister's obsession with using the VR machine for simulated sex ("that groinal attachment's supposed to have a lifetime's guarantee - you've worn it out in nearly three weeks!"). There's the team force-feeding Kryten raw coffee in a bid to sober him up. And there's Rimmer's insistence on ordering "white wine and perrier" from the down-at-heel saloon, before getting into a fight with a man called 'Bear Strangler McGee'.
Bear Strangler McGee: "That pays for the hat. Now what about the insult?"
Rimmer: "OK, you're a fat, bearded git with breath that could paralyse a grizzly."
There's also the small matter of curry-loving Lister posing as "Tarka Dal of the Vindaloovian Empire" in a bid to fool the Simulants, early on.
Red Dwarf's strongest asset, especially during the Starbug episodes, is that it works as both exciting sci-fi odyssey and sharp sitcom.
"We were always keen to try and write fresh stories," explained co-writer Doug Naylor, in 2013.
"It was the science fiction tropes that gave it the impetus and the energy, and the originality. And also, the ability to go anywhere, get off the ship, whatever."
'Gunmen' is arguably the culmination, and exhilarating high-point, of the Red Dwarf formula. It's quite staggering how much it manages to fit into its 30-minute run-time.
Defying the odds
The episode might never have happened, however.
According to Naylor, Janet Street-Porter, who was then BBC liaison on the series, was skeptical to say the least when she eventually read the script - and told them to scrap the entire episode.
Fortunately, they'd finished shooting it the previous day.
For the filming itself, there were copious challenges to overcome. Craig Charles (Lister) and Chris Barrie (Rimmer) had never even sat on a horse before.
Danny John-Jules had to twirl real, heavy Colt 45s, and his original Mexican outfit - before a replacement was swiftly found - was apparently "hideous".
But it all came together in the end, thanks to a lot of hard work and preparation from cast and crew.
The Western scenes were actually shot in a Wild West theme town in Kent.
As Kryten actor Robert Llewellyn notes in the documentary 'Starbuggers', if you look closely there's distinctively "English mud" among the dust.
"It's not a thing on Red Dwarf that you expect, to ride horses," noted Llewellyn. But that element of the unexpected ultimately paid-off.
Even when it first aired, the episode's reception was something to behold.
Critics hailed it as a new benchmark in the show's affectionate satirising of Star Trek style sci-fi, and it was also a watershed moment for the American breakthrough of the show itself, and modern British TV comedy in general.
In 1994 'Gunmen' was nominated for an International Emmy Award from the US TV industry.
Naylor wasn't able to attend the ceremony. The next morning he turned on his TV, went to Teletext (remember that?) and saw that they'd won.
"It was so extraordinary," he recalled.
"[It's] maybe head and shoulders above the rest of the episodes in series six," said Barrie, in an interview that same year.
"Some of the earliest images you see on television are Westerns, with John Wayne, Gary Cooper and people like that, so just to be able to don all those outfits was a great experience. We were kids again."
Red Dwarf is available to watch on Netflix UK.
• Have your say on the latest TV with Screen Babble, the television discussion group on Facebook.
This article originally appeared on our sister site, iNews.