It turns out we may have Westworld to thank for arguably one of Black Mirror's greatest outings, 'San Junipero'.

The season 3 episode proved one of the most uplifting and emotional takes in the otherwise bleak and dystopian Netflix series, giving us a futuristic and unique take on the afterlife.

In it, we see the blossoming relationship between Yorkie and Kelly in a simulated alternative reality, which real-life elderly people can inhabit even in death.

HBO

However, according to creator Charlie Brooker and executive producer Annabel Jones, the original plan for the episode was much darker and more akin to HBO's Westworld, though it was scrapped due to some striking similarities.

"I'd been obsessed with doing a story about the afterlife," Brooker says in book Inside Black Mirror (via Vulture). "I wanted to do a sort of supernatural story, and was thinking of spooky, creepy story ideas. So, weirdly, 'San Junipero' had started in a sort of horror-movie world."

"We always have a scientific explanation for things, even if it's bollocks!" Jones adds. "We introduced the idea of digital consciousness in 'White Christmas,' but hadn't really explored the moral or emotional implications. There was so much untapped potential."

David Dettmann Netflix

Related: Black Mirror's Charlie Brooker reveals real reason why show moved from Channel 4 to Netflix

Brooker expands: "Something else that we'd discussed was a way of expanding the world of [season 2 episode] 'Be Right Back.' We couldn't do this now because of Westworld, but we had the idea of a theme park you went to that was essentially Heaven."

Westworld is set in a futuristic theme park in which hosts serve the guests and can be brought back from the dead repeatedly.

"All your dead relatives and friends would be there, and you'd pay to go and visit them," Brooker added of his Westworld-like 'San Junipero' idea. "So that thought stayed around for a while - this notion of Heaven that you go to as a holiday."

Black Mirror seasons 1-4 are streaming now on Netflix. Westworld airs on HBO.

Want up-to-the-minute entertainment news and features? Just hit 'Like' on our Digital Spy Facebook page and 'Follow' on our @digitalspy Instagram and Twitter account.

This content is created and maintained by a third party, and imported onto this page to help users provide their email addresses. You may be able to find more information about this and similar content at piano.io