The City on the Edge of Forever ( episode ) Suffering from an accidental overdose of cordrazine , Doctor Leonard McCoy goes back to 1930s Earth and saves a woman ' s life , unwittingly changing the course of time and erasing the " Enterprise " and the Federation from history . Summary . Teaser . In orbit around an unexplored planet , the 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 . Act One . Dr . McCoy evades the security teams and enters the transporter room where he attacks the transporter chief Lieutenant Kyle from behind , steals his phaser and energizes the transporter . 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 beam ed 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 , 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 jumps 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 communicator s , 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 . Act Two . 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 photograph s , 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 s 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 cent s 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 Edith 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 1936 , 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 tells Kirk their caretaker will die " this " year . Spock tells Kirk of Keeler ' s 1930 obituary , 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 – does he kill her or prevent her from being killed ? Spock asks Kirk the most pressing question of all : Suppose 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 . Act Three . In a back alley elsewhere in the city , Dr . McCoy arrives , 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 constellation s 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 hospital s in the past needed to use needle s and suture s 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 disintegrates 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 back room 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 Edith Keeler ' s death 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 , with which 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 Kirk : " Edith Keeler must die . " Act Four . 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 , Keeler asks him if he would care to try for 30 . McCoy introduces himself to her , and declares that he is the chief medical officer aboard the USS " Enterprise " . 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 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 . Kirk , his voice vacant , dismisses it by saying " " It ' s not yet time . McCoy ' s not here . " " Spock , however , logically states that they are not 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 doesn ' t know who Clark Gable is , but he knows what a movie 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 tries to warn her , but Spock yells out : " " No , Jim ! " " Dr . McCoy , oblivious to what the ramifications are , begins to run out to help her , but Kirk holds him back as the truck slams on its brakes and strikes Edith . She is killed instantly . Kirk , his eyes clenched in grief , cannot bear to look as passersby scurry into the street and surround Edith Keeler ' s lifeless body . McCoy , shocked and outraged , 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 returned to normal can heal the open wound in his heart over the death of the woman he loved . Back in the 23rd century , Spock and Kirk , once again in their Starfleet uniforms , emerge from the time portal . Scott , incredulous , asks them what happened as from his perspective they had only left a moment ago . From within the time vortex , Dr . McCoy also emerges from the time portal . Spock answers : " " 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 now able 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 somber and despondent tone speaks volumes as he addresses his crew . " " Let ' s get the hell out of here . " " Memorable quotes . " " Killers ! Assassins ! I won ' t let you ! I ' ll kill you first ! I won ' t let you ! You won ' t get me ! Murderers ! Killers ! " " " " A question . Since before your sun burned hot in space and before your race was born , I have awaited a question . " " " " Are you machine or being ? " " " " I am both and neither . I am my own beginning . My own ending . " " " " 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 . " " " " 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 . " " " " A lie is a very poor way to say hello . " " " " 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 . " " " " We have a flop . " " " " We have a what , captain ? " " " " A place to sleep . " " " " One might have said so in the first place . " " " " I am endeavoring , ma ' am , to construct a mnemonic memory circuit using stone knives and bearskins . " " " " Where would you estimate we belong , Miss Keeler ? " " " " You ? At his side , as if you ' ve always been there and always will . " " " " 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 . " " " " Captain . Even when he doesn ' t say it , he does . " " " " 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 . " " " " Captain , suppose we discover that in order to set things straight again , Edith Keeler must die ? " " " " 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 ! " " " " Peace was the way . " " " " She was right . But at the wrong time . " " " " Spock . . . I believe . . . I ' m in love with Edith Keeler . " " " " Jim , Edith Keeler must die . " " " " I have a friend that talks about Earth the same way that you do . Would you like to meet him ? " " " " I ' m a surgeon , not a psychiatrist . " " " " Save her – do as your heart tells you to do – and millions will die who did not die before . " " " " You deliberately stopped me , Jim ! I could have saved her ! Do you know what you just did ? " " " " He " knows , " doctor . . . He knows . " " " " Time has resumed its shape . All is as it was before . Many such journeys are possible . Let me be your gateway . " " " " Captain , the " Enterprise " is up there . They ' re asking if we want to beam up . " " " " Let ' s get the hell out of here . " " Background information . Remastered information . " 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 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 . " " 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 . " " Links and references . References . 20th century ; Alnitak ; Alnitak planet ; American Civil War ; American history ; American missionary ; American Revolution ; apron ; armband ; article ; atomic bomb ; ; ; basement ; bologna ; Boise ; " Bones " ; Brooklyn Bridge ; broom ; budget ; calendar ; camel ; car ; cent ; city council ; classic ; column ( structure ) ; combination lock ; constellation s ; cordrazine ; cot ; duodynetic field core ; Earth ; famous novelist , a ; Fischer ' s Infants Wear ; flop ; Floyd ' s Barber Shop ; furnace ; ; Germany ; gold ; " Goodnight Sweetheart " ; Goody Two - Shoes ; Great Depression ; Great Pyramid ; Guardian of Forever ; Hebrew ; highway ; highway patrolman ; ; jeans ; ; ladder ; ; ; logic ; Madison Square Garden ; March Bake Shop ; ; ; mayor ; ; mile ; missionary ; mechanical rice picker ; mnemonic memory circuit ; ; needle ; novelist ; Orion ' s Belt ; Orpheum ; Outer Mongolia ; palm tree ; plastic surgeon ; plating ; platinum ; ; Radio Corporation of America ; Radiola 20 ; ; San Diego ; ; silver ; Singer ' s Book Store ; slum ; " " ; Star of David ; stone knives and bearskins ; suture ; sweeping ; Thailand ; theme ; tiger ; time planet ; tobacco ; toolbox ; trespassing ; 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 I ; World War II ; zinc Newspaper articles : Bangkok ; ; ; ; Lee ' s Summit ; Missouri ; Paris ; The South ; United States dollar ; Washington , DC Guardian of Forever images : Unreferenced material . Richard Dix