(written from a Production point of view)
After taking an accidental overdose of cordrazine, Doctor Leonard McCoy goes back in time and changes history. (Season penultimate)
In orbit around an unexplored planet, the USS Enterprise is on red alert as it passes through violent time distortions surrounding the planet. As the ship plots its orbit, Montgomery Scott warns that the control circuits are threatening to overload. No sooner does Captain Kirk acknowledge the report, the helm console on the bridge explodes and Lieutenant Sulu is injured. Scott takes the helm as Doctor McCoy is called to the bridge for emergency first aid. Scott questions if the ship should break orbit, but Spock advises against it – the ship is literally passing through ripples in time and it is of great scientific importance that they remain and investigate. Kirk agrees and orders Uhura to broadcast to Starfleet Command his past week's log entries, detailing the unusual readings on the instruments that has diverted the Enterprise to this planet. McCoy arrives and diagnoses Sulu with a heart flutter. He prepares a hypo of cordrazine, warned by Kirk that it is "tricky stuff." Fortunately, the two drops administered by McCoy successfully revives Sulu.
Scott reports that the Enterprise is nearly clear of the time ripples, which Spock confirms, with one heavy displacement directly ahead. The Enterprise shudders violently as it collides with it, causing Dr. McCoy to slip on the helm console and inject the loaded hypospray into his abdomen, emptying its contents into his bloodstream. Kirk and Spock rush to his aid, but McCoy darts up in a panic. Raving and screaming about "killers" and "assassins", McCoy breaks free from the concerned bridge crew and flees the bridge via the turbolift. Kirk orders a security alert.
- "Captain's log, supplemental entry. Two drops of cordrazine can save a man's life. A hundred times that amount has just accidentally been pumped into Dr. McCoy's body. In his strange and wild frenzy, he has fled the ship's bridge. All connecting decks have been placed on alert. We have no way of knowing if the madness is permanent or temporary or what direction it will drive McCoy."
On the bridge, Kirk has returned from sickbay, where the ship's medical department in uncertain of what McCoy's condition will do to him. Spock, having consulted the library computer, discovers that patients exposed to such a level of cordrazine would fail to recognize acquaintances and become hysterically convinced they were in mortal danger, becoming extremely dangerous to himself or anyone else nearby. Suddenly, the transporter room calls the bridge and informs Kirk that McCoy has beamed down to the planet, with the transporter at the time being focused on the center of the time disruptions on the surface. Kirk orders a landing party to be set up to retrieve Dr. McCoy.
Kirk, Spock, Scott, Uhura, Galloway, and a security officer transport down and discover a ruined city with an unusual looking portal in the midst. As Uhura and Scott's teams search for Dr. McCoy, Kirk and Spock investigate the object. Spock reports that it is indeed the center of all the time disruptions, although he cannot explain how it is possible. The object, though it appears inert, is in fact generating powerful enough waves of displacement that the Enterprise could detect it millions of miles away. Kirk asks what it is and a loud, booming voice intones from the object "A question! Since before your sun burned hot in space and before your race was born, I have awaited a question." The object identifies itself as the Guardian of Forever, explaining that is both machine and being, while also being neither. Spock deduces that the Guardian is a time portal – a gateway to other times and dimensions, to which the Guardian confirms is correct and activates its portal, offering Kirk and Spock a gateway into Earth's past.
Suddenly, McCoy cries out – he has been cornered by the search parties. Still madly convinced they are killers and assassins, he tries to escape, but is subdued by a Vulcan nerve pinch, courtesy of Spock. Kirk ponders if they could use the Guardian of Forever to take McCoy backwards a day in time to make certain that his accident never happens. However, the portal's speed is moving fairly quickly, jumping from century to century. Spock suddenly realizes that his tricorder is capable of recording images at the same speed and activates it, just as McCoy regains consciousness. As the landing party is transfixed on the Guardian and the images it is showing, McCoy hears the Guardian explain that this portal will allow people to go anywhere in time. With the landing party momentarily distracted, McCoy jump up and runs towards the portal until it is too late to stop him. The doctor jumps through it and the portal shuts down. When Kirk wonders where he went, the voice of the Guardian explains "He has passed into... what was..."
Uhura suddenly discovers that she's completely lost contact with the Enterprise. Scott finds nothing wrong with the communicators, but the Guardian further explains that "Your vessel, your beginning, all that you knew is gone." Kirk makes the horrible realization that McCoy has somehow changed history, stranding the landing party on the planet with no past and no future. Uhura tells Kirk she's frightened, but, Kirk is equally as disturbed.
- "Earth's not there... at least, not the Earth we know. We're totally alone," Kirk says while looking up at the stars.
- "Captain's log, no stardate. For us, time does not exist. McCoy, back somewhere in the past, has effected a change in the course of time. All Earth history has been changed. There is no starship Enterprise. We have only one chance – we have asked the Guardian to show us Earth's history again, Spock and I will go back into time ourselves and attempt to set right whatever it was that McCoy changed."
The tricorder scans Spock took just as McCoy left reveal that he jumped back to the early 20th century and can approximate when they should jump through the portal, putting them possibly a month or a week prior to McCoy's arrival. Kirk wonders how they will return to the their own time, but the Guardian tells him that if he is successful in mending the timeline, they will all be returned, as if none of them had gone. Scott and Uhura are skeptical about their chances, but Spock logically states that there is no alternative. Kirk, however, out of concern for his officers, tells each of the landing party to jump through the portal if they feel like they've waited long enough for he and Spock to return, allowing them to live in Earth's past rather than be stranded on the Guardian's planet should they fail to find the time date McCoy jumped to. Scott and Uhura bid them good luck as Kirk and Spock simultaneously jump through the portal, backwards through time.
They arrive in New York City, circa 1930. Kirk recognizes the period from old photographs, which Spock clarifies that an economic upheaval had occurred at this point in time. As passersby scrutinize Kirk and Spock's unusual appearance, they make for a back alley to get out of sight. Kirk notices some contemporary clothes on a fire escape and elects to steal them, as their Starfleet uniforms are not suited for the time period. However, they are approached by a police officer, caught red-handed. As Kirk awkwardly tries to explain Spock's Vulcan ears, the policeman prepares to arrest them. However, Spock disables him with a nerve pinch and they escape to the basement of what they soon learn is the 21st Street Mission.
After changing clothes, Spock laments that locked in his tricorder are the images of how McCoy will change history. Unfortunately, he would need to tie it into the Enterprise computer to access the information. Kirk wonders if he could build a computer aid using contemporary materials, but, Spock is dubious as to its success. As their voices carry, they are accosted by the proprietor of the mission, Edith Keeler. Kirk apologizes for their intrusion and tells her the truth as to why they came down there – that they had stolen their clothes because they had no money and were being chased by a policeman. Believing them to be victims of the poor economy, Edith offers them jobs at the mission doing chores at fifteen cents an hour for ten hours a day. Kirk and Spock agree and set to cleaning up the basement.
Hours later, they are eating their complimentary dinner of soup and bread with the other poverty-stricken citizens, when Keeler takes the stage and gives a motivational speech about how she believes the days ahead are worth living for, theorizing that one day soon, man will be able to harness the power of the atom, which could ultimately propel them into outer space, where they will be able to find ways to feed the hungry millions of the world, to cure their diseases and give mankind hope and a common future. Kirk is impressed with her foresight into the future, while Spock believes it to be merely intuition. Afterwards, Keeler compliments Kirk on his and Spock's work in the basement and offers them further work and sets them up with a "flop" (an apartment) in the building where she lives.
Several days later, Spock is hard at work attempting to build the computer aid to access the information in his tricorder, but he laments the speed at which the work is progressing as the technology of the 20th century is barely adequate for his needs. The next day, Spock observes a man using tools for finely detailed work and steals them from the mission's toolbox using his sensitive Vulcan ears to break the combination. Keeler quickly discovers the theft and is very upset that Spock did it, but Kirk is able to convince her that Spock meant no ill will, and would return the tools when he was finished. Edith agrees, as she has become fascinated by Kirk, and asks him to walk her home. The two become close as Keeler questions where Kirk comes from and how he sees the world the same way that she does. As they walk away, Spock looks concerned.
After a few more days, Spock is finally able to access the information in the tricorder, where he discovers Keeler's 1930 obituary – her death the result of a traffic accident. As Kirk enters, he attempts to replay it for him, but another image appears – a newspaper article from six years later, detailing a meeting Keeler has with President Franklin D. Roosevelt. Unfortunately, the strain on the computer aid overloads it, requiring extensive repair work before it can be used again. Kirk believes within six years, Keeler will become nationally famous, but Spock believes their caretaker will die this year. Spock tells Kirk of the conflicting news reports and that Edith Keeler is the focal point in time that both they and Dr. McCoy will be drawn to. Kirk ponders what the correct course of history is, if she lives or dies and what role McCoy, especially in his cordrazine-induced condition will play in it – he might kill her himself or prevent her death.
Spock asks Kirk the most pressing question of all, suppose that they discover to set history right, Edith Keeler must die? Kirk cannot answer and he wrestles with his growing affection for her and the role she will ultimately play in history.
In a back alley elsewhere in the city, Dr. McCoy arrives from the future, screaming out to the "assassins" and the "murderers", garnering the attention of a homeless man, awestruck with fear. He runs, but McCoy pursues him, promising he won't kill him. He eventually catches up to him, but, McCoy soon wonders where he is. The constellations in the sky lead him to believe that he's on Earth, but, even in his manic-state, he believes it's some kind of trick. He begins sobbing hysterically at how hospitals in the past needed to use needles and sutures to attend to people and loses consciousness. The derelict picks McCoy's pocket and takes his phaser. Unfortunately, as he examines it, he activates the overload circuit and vaporizes himself.
The next morning, McCoy looks in terrible shape. As he staggers around the streets, still suffering the effects of his cordrazine overdose, he discovers the 21st Street Mission. He goes inside where Edith is serving coffee. She notices his condition and offers to help, but he says he must not be found, so she takes him to a cot in the backroom where he won't be disturbed. As they depart, Spock takes over for her pouring the coffee, missing McCoy by only a few seconds. Shortly thereafter, Spock is able to repair the computer aid and accesses the tricorder again.
According to the scans taken from the time vortex, Spock is convinced that McCoy prevented Keeler from dying in a traffic accident as she was meant to in the "correct" timeline. She later went on to found a pacifist movement whose influence on President Roosevelt delayed the United States' entry into World War II. As the peace negotiations dragged on, Adolf Hitler and Nazi Germany had time to complete their heavy water experiments, allowing them to develop the atomic bomb first, whereby Germany conquered the world. Spock tells Kirk they must stop McCoy. Kirk wonders when she has to die, but, Spock informs him that while they can extrapolate general events, they cannot pinpoint exact movements at exact time. Kirk, his heart already breaking, tells Spock that he believes he is in love with Edith Keeler. Spock grimly reminds the captain that Edith Keeler must die.
McCoy regains consciousness, almost fully recovered now, with Keeler at his bedside. While it appears to him that he's back on Earth around 1920 or '25, he dismisses it as part of the cordrazine overdose. He declares that he is the chief medical officer aboard the USS Enterprise. However, Keeler, believing him to be speaking of a naval vessel, tells him that he's hardly wearing a navy uniform and dismisses his claim as part of his deteriorated condition. Noting the peculiar way he speaks of present-day (for her) Earth, she asks McCoy if she would like to meet her friend who seems to talk the same way, but McCoy is not interested. "I'm a surgeon, not a psychiatrist," he states.
Later, at their apartment building, Kirk approaches Keeler on the staircase. As she goes to meet him, she stumbles. Kirk, reflexively, catches her before she can fall. Spock witnesses this and after Kirk and Keeler part for the moment, Spock reminds him that she might have died had Kirk not caught her. The captain, his voice vacant, dismisses it by saying "It's not yet time. McCoy's not here." Spock, however, logically states that they are not very certain of their facts and cannot know for sure when the right time will come. He reminds Kirk that if he saves her life, "Millions will die who did not die before."
In the evening hours, McCoy is now fully restored to health thanks to Keeler's ministrations. As he drinks a cup of coffee, he offers to help out around the mission to thank her for saving his life. Keeler tells him they can discuss it later as she has to leave, her gentleman caller is taking her to see a Clark Gable movie. Dr. McCoy is uncertain as to who Clark Gable is, which she finds very strange and bids him good night.
Spock exits the mission as Kirk and Keeler do. As they cross the street, hand in hand, Keeler mentions the idea of seeing the Clark Gable movie. Kirk questions who's she's talking about and Keeler makes an offhand comment about how Dr. McCoy had the same reaction. Kirk, immediately, jumps to attention and asks her if she's talking about Leonard McCoy. She confirms that she is and Kirk tells her to wait on the sidewalk for him as he calls out to Spock. They dash back to the mission as Dr. McCoy exits from it. The three embrace in relief at finally being reunited.
Keeler, watching from the other side of the street, begins to cross to see what is going on as a large truck turns the nearby corner and speeds down the street. Kirk notices her approaching and the oncoming truck and moves to warn her, but Spock and McCoy yell out to him "No, Jim!" Kirk instantly remembers what he has to do and watches in horror as he sees the truck bear down on the unsuspecting Edith Keeler. Dr. McCoy, oblivious to what the ramifications are, begins to run out to assist her and Kirk has no choice but to grab hold of McCoy and stop him. As Kirk and McCoy struggle, the truck slams on its brakes as Keeler crosses in front of it, but it's too late and her death scream is the only sound that fills the air as it runs her down.
Kirk, his eyes clenched in grief, cannot bear to look as passersby scurry into the street and surround Edith Keeler's lifeless body. McCoy, in horror and anger, turns to Kirk and says "You deliberately stopped me, Jim! I could have saved her! Do you know what you just did?!" Kirk shoves McCoy aside as Spock somberly replies "He knows, doctor... he knows." In Kirk, not even the knowledge that history has been restored can soothe the open wound in his heart that is the death of the woman that he loved.
Back in the 23rd century, Spock and Kirk, back in their Starfleet uniforms, emerge from the time portal. Scott, incredulous, asks them what happened as from his perspective they had just jumped through the portal moments before. From within the time vortex, Dr. McCoy jumps back out, as well. Spock announces "We were successful." The voice of the Guardian of Forever booms as it declares "Time has resumed its shape. All is as it was before. Many such journeys are possible. Let me be your gateway." Uhura is able to now contact the Enterprise, where the crew is wondering if the landing party wants to beam back up.
Even with the wondrous invitation from the Guardian to travel to other times and other places, Kirk's grim and hurt expression speaks volumes as he gives his order.
"Let's get the hell out of here."
- "Captain's log, supplemental entry. Two drops of cordrazine can save a man's life, a hundred times that amount has just accidentally been pumped into Dr. McCoy's body. In a strange, wild frenzy, he has fled the ship's bridge. All connecting decks have been placed on alert. We have no way of knowing if the madness is permanent or temporary, or in what direction it will drive McCoy."
- "Captain's log, no stardate. For us, time does not exist. McCoy, back somewhere in the past, has effected a change in the course of time. All Earth history has been changed. There is no starship Enterprise. We have only one chance. We have asked the Guardian to show us Earth's history again: Spock and I will go back into time ourselves, and attempt to set right whatever it was that McCoy changed."
"Killers! Assassins! I won't let you! I'll kill you first! I won't let you! You won't get me! Murderers! Killers!"
- - McCoy, after an accidental injection of cordrazine
"A question. Since before your sun burned hot in space and before your race was born, I have awaited a question."
- - Guardian of Forever, to Kirk
"Are you machine or being?"
"I am both and neither. I am my own beginning. My own ending."
- - Kirk and the Guardian of Forever
"Captain, I've lost contact with the ship. I was talking to them. Suddenly, it went dead. No static; just nothing."
"Kirk to Enterprise. Scotty."
"Nothing wrong with the communicator, sir."
"Your vessel, your beginning. All that you knew is gone."
- - Uhura, Kirk, Scott and Guardian of Forever, after McCoy changes the timeline
"My friend is obviously Chinese. I see you've noticed the ears. They're actually easy to explain... He caught his head in a mechanical... rice picker."
- - Kirk to the police officer, explaining Spock's alien appearance
"A lie is a very poor way to say hello."
- - Keeler, meeting Kirk and Spock
"One day soon, man is going to be able to harness incredible energies – maybe even the atom; energies that could ultimately hurl us to other worlds in some sort of spaceship. And the men that reach out into space will be able to find ways to feed the hungry millions of the world and to cure their diseases. They will be able to find a way to give each man hope and a common future... and those are the days worth living for."
- - Keeler, on her vision of man's future
"We have a flop."
"We have a what, captain?"
"A place to sleep."
"One might have said so in the first place."
- - Kirk and Spock
"I am endeavoring, ma'am, to construct a mnemonic memory circuit using stone knives and bearskins."
- - Spock, as Keeler sees his work on the tricorder
"Where would you estimate we belong, Miss Keeler?"
"You? At his side, as if you've always been there and always will."
- - Spock and Keeler
"Couldn't you build some kind of computer aid here?"
"In this zinc-plated vacuum-tubed culture?"
"Yes, well, it would pose an extremely complex problem in logic, Mister Spock. Excuse me. I sometimes expect too much of you."
- - Kirk and Spock
"Captain. Even when he doesn't say it, he does."
- - Keeler, on Spock
"Let me help. A hundred years or so from now, I believe, a famous novelist will write a classic using that theme. He'll recommend those three words even over I love you."
- - Kirk, to Keeler
"Captain, suppose we discover that in order to set things straight again, Edith Keeler must die? "
- - Spock, about Keeler and history
"Assassins! Murderers! Murderers! Assassins! You! What planet is this? No! Don't run! I won't kill you! It's they who do the killing! Don't run! I won't kill you!"
- - McCoy, startling a homeless man upon his arrival in the 20th century
"Peace was the way."
"She was right. But at the wrong time."
- - Kirk and Spock, on Keeler's peace movement
"Spock... I believe... I'm in love with Edith Keeler."
"Jim, Edith Keeler must die."
- - Kirk and Spock
- - Keeler and McCoy
"Save her – do as your heart tells you to do – and millions will die who did not die before."
- - Spock, to Kirk
"You deliberately stopped me, Jim! I could have saved her! Do you know what you just did?"
"He knows, doctor... He knows."
- - McCoy (to Kirk) and Spock, on Keeler's death
"Time has resumed its shape. All is as it was before. Many such journeys are possible. Let me be your gateway."
- - Guardian of Forever, after Kirk, Spock, and McCoy return
"Captain, the Enterprise is up there. They're asking if we want to beam up."
"Let's get the hell out of here."
- - Uhura and Kirk, before beaming back to the Enterprise
- Treatment is assigned: 16 March 1966
- Story outline by Harlan Ellison: 21 March 1966
- Revised story outline: 1 May 1966
- Second revised story outline: 13 May 1966
- First draft teleplay by Ellison: 3 June 1966
- Revised first draft teleplay: 13 June 1966
- Final draft teleplay: 12 August 1966
- First draft teleplay by Steven W. Carabatsos: October 1966
- Second revised final draft by Ellison: 1 December 1966
- Story outline by Gene L. Coon: 29 December 1966
- Rewrite first draft teleplay by Coon: 9 January 1967
- Rewrite second draft teleplay by D.C. Fontana: 18 January 1967
- Rewrite revised second draft teleplay: 23 January 1967
- Revised teleplay ("Shooting script") by Coon: 27 January 1967
- Additional revisions: 30 January 1967
- Rewrite final draft teleplay by Gene Roddenberry: 1 February 1967
- Additional revisions by Coon and Roddenberry: 2 February 1967, 3 February 1967, 8 February 1967, 9 February 1967
- Filmed: 3 February 1967 – 14 February 1967
- Score recording: 24 March 1967
- Premiere airdate: 6 April 1967
- First rerun: 31 August 1967
- First UK airdate 26 July 1969
- Wins Hugo Award for Best Dramatic Presentation: 1968
- "Yesteryear", featuring the Guardian of Forever, premieres: 15 September 1973
- Six Science Fiction Plays, edited by Roger Elwood, includes the teleplay (albeit a slightly different version than Ellison published in 1995): 1976
- Star Trek Fotonovel #1: 1977
- Yesterday's Son, a novel featuring the Guardian of Forever: August 1983
- The City on the Edge of Forever limited edition hardcover: September 1993
- Entertainment Weekly ranks it as the #1 TOS episode: Fall 1994
- "Look Back in Anger", an essay by Harlan Ellison, appears in the TV Guide magazine special "Star Trek: Four Generations": Spring 1995
- Ranked #68 in TV Guide's 100 Most Memorable Moments in TV History: 1 July 1995
- The City on the Edge of Forever trade paperback: 1 July 1996
- Kirk and Spock action figures (Playmates Warp Factor series 5): 1998
- Remastered airdate: 7 October 2006
- The title of this episode refers to both the dead city on the time planet and New York itself, where the timeline will either be restored or disrupted. In Ellison's original script, Kirk, upon first seeing the city sparkling like a jewel on a high mountaintop, reverently says it looks like "a city on the edge of forever". In Ellison's first treatment for this episode, the city they traveled back in time to was Chicago.
- When asked in a February 26, 1992 interview whether the makers of this episode consciously intended it to have the contemporaneous anti-Vietnam-war movement as subtext, associate producer Robert Justman replied, "Of course we did." 
- In The Star Trek Compendium, Allan Asherman suggests that the name "Keeler" is derived from the "keel" of a ship, the longitudinal element of a vessel that keeps it held together – much as Keeler herself keeps the time continuum from coming apart. It also could be interpreted as a hybrid of "killer" and "healer"--a reference to her dual role as the focal point of the time flow. In Ellison's first treatment for this episode, Edith's last name was Koestler.
- Ellison's original story outline and first draft script did not feature Dr. McCoy, but an Enterprise crewman named Beckwith, who was dealing drugs among the crew. Beckwith murdered a fellow crewman named LeBeque, who was on the verge of turning him in, escaped to the planet the ship was orbiting, and went through the Time Vortex, operated by a mysterious ancient race called "The Guardians" and changed history. The Enterprise was gone, and a savage pirate ship called the Condor was in its place, full of renegade humans. Kirk and Spock follow Beckwith through the time portal to 1930 New York City, where Kirk falls in love with young social worker Edith Keeler (Koestler in the story outline). Finally, with the help of a legless World War I veteran called Trooper (who dies during the episode's action), they find Beckwith. In the end, Kirk does not stop him saving Edith: he freezes at the crucial moment and Spock prevents her rescue. In a brief epilogue, Spock visits Kirk in his quarters and attempts to console him, saying that "No other woman was offered the universe for love." (The Star Trek Compendium), 
- In Ellison's very first story outline, Beckwith was sentenced to death after he murdered LeBeque, and Kirk ordered his execution to take place on the next deserted planet the Enterprise comes across. Hence, they beam down with Beckwith and a firing squad to the Guardian Planet. This was very soon eliminated from the story. (These Are the Voyages: TOS Season One). In the revised script by Ellison, Beckwith escapes from Spock and jumps into the Time Vortex again; however he ends up trapped in a super nova time loop which kills him over and over again.
- Ellison also wrote scenes in which the regular characters acted very much unlike their usual behavior. For example, Kirk and Spock got into a heavy argument when Spock, witnessing a street speaker calling out against foreign immigrants, called the Human race barbaric. Kirk then claims he should've just left Spock to be lynched by the mob. (These Are the Voyages: TOS Season One)
- Ellison's script was unusable for the series for many different reasons. Gene Roddenberry objected to the idea that drug usage would still be a problem in the 23rd century, and even present among starship crews. Also, the production staff was heavily against Kirk's final inactivity. It seemed that being unable to decide and act, viewers could never be able to accept him as the strong leader figure in later episodes. Elements, such as the Guardians and the Condor and its crew were simply impossible to create on the series' budget. (The Star Trek Compendium), 
- Originally then-story editor Steven W. Carabatsos got the job to rewrite Ellison's script, but his draft was not used. Instead, Ellison agreed to make a rewrite himself, which was again deemed unsuitable. Producer Gene L. Coon also got himself into the rewriting. Finally, the new story editor, D.C. Fontana got the assignment to rewrite Ellison's script and make it suitable for the series. Fontana's draft was then slightly rewritten by Roddenberry to become the final shooting draft. Much of the finished episode is the product of Fontana, who went uncredited (as did all the other writers) for her contribution. Only two lines from Ellison's original teleplay survive in the final episode, both spoken by the Guardian: "Since before your sun burned hot in space, since before your race was born," and "Time has resumed its shape." (Inside Star Trek: The Real Story)
- Coon is mainly responsible for the small comical elements of the story, including the famous "rice picker" scene, which Ellison has reportedly hated. (These Are the Voyages: TOS Season One)
- Ellison was dismayed with the changes Roddenberry and Fontana made to his story, so much so, that he wished his credit to read "written by Cordwainer Bird", a request Roddenberry denied. Though Ellison had the final right to have his pseudonym attached, he claims that Roddenberry made veiled threats that if he did so he would be "blackballed" in the television and motion picture industry. Despite this feud, Roddenberry would list this as one of his top ten favorite episodes in an issue of TV Guide celebrating the 25th anniversary of Star Trek. In his own defense, Ellison stated he had no real problem with D.C. Fontana rewriting him, but rather with the extent and number of unpaid rewrites the studio and network got out of him, to say nothing of exaggeration-prone Gene Roddenberry telling fans that Ellison's script showed "Scotty selling drugs" (the script did not feature Scott at all). (Star Trek: Four Generations)
- Roddenberry apparently denied Ellison's pseudonym request because he knew everyone in the science fiction community was aware that the "Cordwainer Bird" credit was Ellison's way of signaling his dissatisfaction with the way production people treated what he wrote. It would have meant that Star Trek was no different than all the other "science fiction" shows in mistreating quality writers, and could have resulted in prose science fiction writers avoiding contributing to the program. (Inside Star Trek: The Real Story)
- This was the most expensive episode produced during the first season, with a budget of $245,316, and also the most expensive episode of the entire series, except the two pilots. The average cost of a first season episode was around US$190,000. Also, production went one and half days over schedule, resulting in eight shooting days instead of the usual six. (Inside Star Trek: The Real Story)
- Joseph Pevney was chosen to direct on this episode because of his experience in directing more than twenty feature films. (These Are the Voyages: TOS Season One)
- There is a scene in the original 1960s broadcast version that has been partially deleted in some editions. When McCoy meets Rodent holding the milk bottle, the scene ends with McCoy collapsing, then cuts to McCoy meeting Keeler in the Mission. As originally filmed, after McCoy collapses, Rodent picks McCoy's pocket and takes his hand phaser (which he took from the transporter chief) and accidentally sets it on overload, and kills himself. The scene is present in its original form in DVD and laserdisc versions.  
- The network heavily objected to Kirk's last line, "Let's get the hell out of here" and wanted it to be removed from the episode.  The word "Hell" was used four times in The Original Series, the other three being "Space Seed", when Kirk quotes Milton, "It is better to rule in Hell than serve in Heaven", "The Alternative Factor", when Lazarus tells his counterpart, "I'll chase you into the very fires of hell!", and "The Doomsday Machine", when Decker describes the berserker as "right out of hell." "City" marks the only time that the word was used as an expletive, rather than a reference to the domicile of the damned.
Sets and propsEdit
- The footage seen through the time portal is, for the most part, lifted from old Paramount films.
- The set used for New York City in this episode (called 40 Acres) is the same set used for The Andy Griffith Show. While Kirk is walking with Edith Keeler, they pass the courthouse and Floyd's barber shop. The same back lot was used for location shooting in "Miri" and "The Return of the Archons".
- The alley in which Kirk steals the clothing from the fire escape is the same alley seen in "Miri", in which Spock and the guards have debris dumped on them by the children.
- Director Joseph Pevney couldn't complete all scenes scheduled to be filmed at 40 Acres on schedule. However, the back lot was already booked for filming by The Andy Griffith Show, so the arrival of McCoy to the past and Rodent's death had to be filmed on a studio alleyway behind Desilu Stage 10. (These Are the Voyages: TOS Season One)
- Desilu Stage 11, usually not a Star Trek stage, was used for filming the mission interiors. The stage was occupied by My Three Sons previously, but as that series was moved to another location, it became available for the crew to film. (These Are the Voyages: TOS Season One)
- The stock footage shot of the outside of Kirk and Spock's flop, seen after the man kills himself with McCoy's phaser, shows the sign for a fallout shelter on it. There were, however, no nuclear weapons in 1930.
- The Guardian of Forever was designed by Art Director Rolland M. Brooks. Normally, set design was the purview of his colleague Matt Jefferies, but due to illness, Brooks took over his chores for the Guardian. When Jefferies returned to his duties and saw the donut-shaped set piece for the first time, he reportedly exclaimed, "What the hell is this?!", according to Story Editor Fontana. (These Are the Voyages: TOS Season One, 1st ed, p. 517) Special effects artist Jim Rugg was responsible for the light effects for the Guardian. (Cinefantastique, Vol 17 #2, p. 24)
- Together with Jefferies, Rugg was also responsible for Spock's computer-aid to access the information in his tricorder for the episode, as Jefferies recalled, "When a script came out, Roddenberry would say, "I need something that supposedly does such and such...come up with something." So we would work together on the workbench with Jimmy Rugg and see what we could cobble together.", to which Rugg added, "We got a bunch of antique vacuum tubes–real '30s types–and added a few blinking lights among them." Rugg subsequently oversaw its destruction in the episode. (Cinefantastique, Vol 17 #2, p. 24)
- Due to copyright issues, the original Ray Noble recording of "Goodnight Sweetheart" was replaced during the 1980s by another version for VHS and Laserdisc releases. However, Paramount's 1980 "Television Classics" home video release of this episode retains the original recording. Eventually this was corrected for the DVD release. New music was also composed for this episode, incorporating the song, but the composer of this music, Fred Steiner, was not named in the closing credits. (X)
- According to The Music of Star Trek, Fred Steiner takes credit for scoring new music (although sparse – only a few cues) for this episode. Most of the episode was tracked with prior music, including Joseph Mullendore, Gerald Fried, and Alexander Courage. Also, music from "Shore Leave" is heavily present, including the score for the police chase, and some humorous cues in certain scenes. Most of the music accompanying the romance of Kirk and Edith Keeler are taken from "The Conscience of the King".
- Stock footage from "Dagger of the Mind" and "The Naked Time" is used for Kirk's and Spock's reaction shots to McCoy's cordrazine overdose on the bridge.
- Double-exposures allowed Kirk and Spock to leap out of brick walls in this episode.
- During the speech scene in the Mission where Kirk and Spock have sat down with their soup, the director repeated (and slowed down) several close-up shots of Spock and Kirk, taken from later in the scene, and used them as reaction shots during Edith's prognostications.
- The close up of the tricorder showing the "rewinding video" is used several other times throughout the series.
- No stardate is logged in the episode. Bjo Trimble assigned a stardate of 3134 based on Harlan Ellison's original teleplay, which covered stardates 3134.6-8.
- A comparison of the calendar on the wall behind Kirk and Edith when she calls him and Spock "uncommon workmen" to the real calendar from 1930 shows that this episode was taking place in May, 1930, however the calendar year and date were taped-over and the month also shows only 30 days.
- Clark Gable, who was by no means a leading man in 1930, was not the original choice of reference. The final shooting draft of this script has Edith reference "a Richard Dix movie", but the crew on the set felt Dix's name wouldn't be familiar to viewers in the 1960s.
- The use of the song "Goodnight Sweetheart" is a slight anachronism, since the song was first recorded in 1931. 
- Edith Keeler tells Kirk "Let me help". Kirk replies, "A hundred years or so from now, a famous novelist will write a classic using that theme. He'll recommend those three words, even over 'I love you'." Kirk tells her that the novelist will come from a planet circling the far left star in Orion's belt: Zeta Orionis (or Alnitak).
- This is the first mention of Nazi Germany in Star Trek. A race which adopted a Nazi-style regime also appears in TOS: "Patterns of Force". The theme is reprised in later shows: on VOY: "The Killing Game", where Hirogen take over USS Voyager and use the holodeck to recreate Nazi Germany, and then in ENT: "Zero Hour", and "Storm Front", when agents from the Temporal Cold War send Captain Archer and Enterprise NX-01 back to the Second World War. (X)
- The portal is revisited in the animated series episode "Yesteryear" and numerous books.
- In one scene in this episode, a poster can be seen advertising a boxing event at Madison Square Garden featuring "Kid McCook" vs. "Mike Mason". For the Star Trek: Deep Space Nine episode "Past Tense, Part II", scenic artists Doug Drexler and Michael Okuda created a near replica of this boxing poster for a scene set in 1930 San Francisco; the DS9 poster features the same boxers, and says that it is "their first rematch since Madison Square Garden".(X)
- Star Trek: Voyager also made a small tribute to this episode in "Future's End", when Janeway likens late-20th century computer technology to "stone knives and bearskins".
- With regards to "The City on the Edge of Forever", Joan Collins has stated, "To this day, people still want to talk about that episode – some remember me for that more than anything else I've done. I am amazed at the enduring popularity of Star Trek and particularly of that episode." Collins adds, "At the time none of us would have predicted the longevity of the show. I couldn't be more pleased – or more honored – to be part of Star Trek history." (Star Trek 30 Years) Ms. Collins' memory of her Trek experience seems hazy, however. In her 1985 autobiography, Past Imperfect (p. 248) she makes a few errors regarding the episode: for example, in addition to the common mistake of referring to Mr. Spock as Dr. Spock, she identifies her character as Edith Cleaver instead of Edith Keeler, and she also claims that Spock, not Kirk, allowed her character to be killed – a plot point that was not in the version of the script that was actually shot. Most significantly, she claims Edith tried to "prove to the world that Hitler was a nice guy."
- This episode was chosen by William Shatner as his favorite episode of the entire series in the Star Trek: Fan Collective - Captain's Log DVD set. However, in his book Star Trek Memories, Shatner wrote that "The Devil in the Dark" was his favorite episode. Therefore, he seems to have two favorites.
- This episode was chosen by Eugene W. "Rod" Roddenberry (son of Gene Roddenberry) to be his favorite episode. (X)
- The book Star Trek 101, by Terry J. Erdmann and Paula M. Block, lists this episode as one of "Ten Essential Episodes" from the original Star Trek series.
- Roddenberry picked it as one of his ten favorite episodes for the franchise's 25th anniversary. (TV Guide August 31, 1991) Five years later, TV Guide ranked this as the best Star Trek episode for their celebration of the franchise's 30th anniversary. (TV Guide August 24, 1996 issue)
- TV Guide ranked this episode #80 on their list of the Top 100 Episodes. 
- By popular acclaim, this is the single best episode of the original series, earning a 1968 Hugo Award for Best Dramatic Presentation (and the other four nominees were all episodes of Star Trek). It was 25 years before another television program received the honor, "The Inner Light". TV Guide also ranked it #68 in their 100 Most Memorable Moments in TV History feature in the 1 July 1995 edition, and also featured it in another issue on the 100 greatest TV episodes of all time.
- This episode is the only Star Trek episode to win a Writers Guild of America Award. Ellison took the award home for "Best Written Dramatic Episode", for his original version of the teleplay. On the award ceremony (where Roddenberry, Coon, Robert Justman, Herb Solow, and other Star Trek production people were present), Ellison loudly spoke out against executives rewriting his and other writers' work in the industry. (Inside Star Trek: The Real Story)
Novelizations and adaptationsEdit
- Bantam Books published a series of novelizations called "fotonovels," which took photographic stills from actual episodes and arranged word balloons and text over them, to create a comic book formatted story. The first installment was an adaptation of this episode and featured a short interview with Ellison.
- In his adaptation of the story in Star Trek 2, James Blish explained to readers that he tried to preserve the best elements of both Ellison's original script and the final version. In the original, because Kirk does not act to prevent Edith's death, Spock later tells him that "No other woman was ever offered the universe for love." Blish's adaptation preserves the final version of Kirk allowing Edith to die, with the result that Spock tells him, "No other woman was ever almost offered the universe for love." Additionally, in this adaptation, during Edith's soup-kitchen prophecies, Spock leans over to Kirk and says, "Bonner the Stochastic," to which Kirk replies, "He won't be born for a hundred years yet." Bonner the Stochastic was a character who appeared in several of Blish's novels, and was inserted into this episode's prose adaptation by Blish himself. Stochastic refers to any process (including thinking) that uses randomness or conjecture.
- The final shooting script, dated 27 January 1967, specifies that the novelist who came up with "Let me help" was Patrick Koluuunahmeheheh Tajnaahme. Ellison's original screenplay, as well as Blish's adaptation, had an additional final scene, where Spock privately offers his condolences to a grieving Kirk and suggests that he accompany him to Vulcan to come to terms with the experience.
- The 2006 Crucible trilogy of novels follows up on plot elements from this episode. In Provenance of Shadows by David R. George III, it is shown what happened to the version of McCoy and Earth when he went back in time and altered history by saving Edith. McCoy places constant ads to try and signal for help in the future, but soon realizes that no help is coming. On advice, he makes his way south, ending up in a small town outside of Atlanta. There, he becomes the local doctor, marries a widow, and is eventually killed when the hostilities with the Nazis (spilling into US borders in this timeline) escalate. The novel also reveals that, in the proper timeline, Kirk and Spock spent 47 days in New York City from January to March 1930.
- A sequel to this story was presented in Gold Key Comics' TOS issue #56 "No Time Like the Past".
- An episode of South Park, in which one of the children on a trapped school bus wearing a red commander uniform was killed, was given the same title as this episode.
- Ellison's original teleplay was adapted by IDW Publishing for a five-issue comic book series titled Harlan Ellison's The City on the Edge of Forever.
"The City on the Edge of Forever" was the fifth episode of the remastered version of The Original Series to air. It premiered in syndication on the weekend of 7 October 2006 and featured new effects shots of the Enterprise and the time planet from space, a slightly tweaked pan up from the planet's surface, an enhanced disintegration effect as Rodent accidentally sets off McCoy's phaser, cleaned-up mattes and static effects in the tricorder insert shots, and eliminated the freeze-framing over the end credits.
With regards to some of the new updates, Rossi stated, "For instance, in "City on the Edge of the Forever," there's a line where Captain Kirk says, "'These ruins extend to the distance.'" So we extended that shot into a 16:9 aspect ratio and created all these wonderful ruins." (X)
Not everything worked out as planned, however, "The Guardian planet [in 'City'] is this ancient world where supposedly the civilization died many millennia ago, and so I think what everyone expected to see is a gray, barren planet. Which we could have done – we can make a lot of gray, barren planets," says Rossi. In their attempt to recreate the consistency of the original soundstage-filmed planetside scenes, "We started looking at the backdrop – the cloth backdrop that they used – and it was kind of a purplish color, and so we wanted to tie these things together. What the visual effects team did was, create this rocky barren world with these giant purplish desert flats. Now, unfortunately, without us being able to come into your home and say, 'These are giant desert purplish flats,' I think a lot of people read them as oceans, which is kind of unfortunate. But that's what we were going for." (X)
- The next remastered episode to air was "I, Mudd".
Video and DVD releasesEdit
- Original US VHS and Betamax release: 1980 (as Volume 5 of Paramount Home Video's Television Classic's Series with Balance of Terror)
- US CED VideoDisc release: 22 March 1981
- US LaserDisc release: January 1986
- UK VHS release (two-episode tapes, CIC Video): Volume 15, catalog number VHR 2311, release date unknown
- US VHS release: 1986 (released as part of Paramount's releases of individual episodes)
- Japan LaserDisc release: 10 November 1992
- US VHS release: 15 April 1994
- As part of the UK VHS Star Trek: The Original Series - Tricorder Pack collection: catalog number VHR 4373, 3 June 1996
- UK re-release (three-episode tapes, CIC Video): Volume 1.10, 13 January 1997
- Original US DVD release (single-disc): Volume 14, 11 July 2000
- As a bonus on the Region 2 release of VOY Season 1 DVD
- As part of the TOS Season 1 DVD collection
- As part of the Star Trek: Fan Collective - Time Travel DVD collection
- As William Shatner's episode choice in the Star Trek: Fan Collective - Captain's Log DVD collection, featuring an introduction by Shatner and Joan Collins
- As part of the TOS Season 1 HD DVD collection
- As part of The Best of Star Trek: The Original Series DVD collection
- As part of the TOS Season 1 Blu-ray collection
Links and referencesEdit
- John Harmon as the rodent
- Hal Baylor as a policeman
- David L. Ross as Galloway
- John Winston as the transporter chief
- Bartell La Rue as the Guardian voice
- Frank da Vinci as Brent
- William Blackburn as Hadley
- Howard Culver as the drunk
- Adolf Hitler as Adolf Hitler (voice) (archive footage)
- Carey Loftin as Truck driver
- Eddie Paskey as Leslie
- Unknown performers as
Stunt doubles Edit
- Bobby Bass as stunt double for James Doohan
- Dave Perna as stunt double for DeForest Kelley
- Mary Statler as stunt double for Joan Collins
20th century; Alnitak; Alnitak planet; American history; American missionary; apron; armband; article; atomic bomb; Bailey, Will; Barnes, Gus; basement; bologna; Boise; "Bones"; Brooklyn Bridge; broom; budget; calendar; car; cent; City Council; classic; column (structure); combination lock; constellations; cordrazine; cot; duodynetic field core; Earth; Fischer's Infants Wear; flop; Floyd's Barber Shop; furnace; Gable, Clark; Germany; gold; Goodnight Sweetheart; Goody Two-Shoes; Great Depression; Great Pyramid; Guardian of Forever; Hebrew; highway; highway patrolman; Hitler, Adolf; jeans; Kidd, Killer; ladder; Lloyd, Gus; logic; Madison Square Garden; March Bake Shop; Mason, Mike; Mason, Ricky; mayor; McCook, Kid; mile; missionary; mechanical rice picker; mnemonic memory circuit; Mulaney, Charley; needle; Orion's Belt; Orpheum; Outer Mongolia; plastic surgeon; plating; platinum; Prado, Manuel; Radio Corporation of America; Radiola 20; San Diego; Sencio, Buddy; silver; Singer's Book Store; slum; Star Dispatch, The; Star of David; stone knives and bearskins; suture; sweeping; Thailand; theme; time planet; tobacco; toolbox; tricorder; Twenty-First Street Mission; ; V-2 rocket; vacuum tube; Vanguard Insurance Company; Victor Ice Company; Vulcan neck pinch; Walt's Restaurant; Widin Dairy Farm; wood alcohol; World War II; zinc
- Harlan Ellison; The City on the Edge of Forever; White Wolf Publishing; ISBN 1565049640 (1st edition, hardcover, 1996)
- "The City on the Edge of Forever" at StarTrek.com, the official Star Trek website
- "The City on the Edge of Forever" at Memory Beta, the wiki for licensed Star Trek works
- "The City on the Edge of Forever" at Wikipedia
- "The City on the Edge of Forever" at MissionLogPodcast.com, a Roddenberry Star Trek podcast
- Detailed Synopsis of Ellison's First Draft at Orion Press
| Previous episode produced:|
"Errand of Mercy"
| Star Trek: The Original Series|
| Next episode produced:|
"Operation -- Annihilate!"
| Previous episode aired:|
"The Alternative Factor"
| Next episode aired:|
"Operation -- Annihilate!"
| Previous remastered episode aired:|
"The Naked Time"
|TOS Remastered|| Next remastered episode aired:|