"The Lonely" is the seventh episode of The Twilight Zone, first broadcast in November of 1959. It stars Jack Warden, John Dehner and Jean Marsh. Ted Knight, who would later costar in The Mary Tyler Moore show, has a supporting role in the episode as well. This is also one of the first television roles for Jean Marsh, the then wife of Jon Pertwee, who would later go on to a long acting career.
The episode takes place on a prison asteroid, and was filmed "on location" in Death Valley. It is the year 2046, and James Corry (Warden) has been sentenced to 50 years on an asteroid millions of miles from earth, alone. Captain Allenby (Dehner) is the captain of the supply ship that stops by every few months. Allenby is a compassionate man and also believes Corry's claim that his crime of homicide was self-defense. To help Corry pass the time and stay sane, he brings him a robotic companion, in the form of a woman named "Alicia". Corry at first refuses what he considers to be "unreal" companionship, but quickly changes his mind. But when he is offered pardon and release from his crime, he has to make a choice between rejoining society and keeping his new companion, a choice that leads to a near-perfect Twilight Zone ending.
This episode is great. It is stories like this that established the Twilight Zone as a classic series. And also, seven episodes into the show, we finally get a true science fiction story: other stories have dabbled in fantasy and magical realism, but this story (despite some problems of astronomical veracity) is hard science-fiction. The show builds its atmosphere perfectly by being shot in the desolation of Death Valley, and the acting is taut and understated. And whereas some of the past few "twist endings" have been rather saccharine, this episode's thought-provoking ending pulls no punches.