Admiral Kirk, Spock, and the others are on a Klingon vessel and learn that the Earth is in danger of destruction because of a probe looking for humpback whales. They time travel back to the 20th century to try to get whales to save the Earth in their time.
On the spaceship USS Saratoga they detect an unknown probe and radio Starfleet Command.
During a Federation trial the Klingon ambassador (John Schuck) shows destruction of spaceships in a battle and argues that James T. Kirk is a renegade and terrorist who murdered a Klingon crew and stole a Klingon vessel; also while negotiating a peace treaty with the Klingons he was developing the Genesis torpedo or what they called the Genesis planet which was to be a secret base from which to launch an attack to devastate the Klingon people. He says they demand his extradition so that they can have Klingon justice.
The Vulcan ambassador Sarek (Mark Lenard) comes forward while saying that Klingon justice would be unique. He says Genesis was named well for the creation of life, not death. He accuses the Klingons of shedding the first blood while attempting to gain its secrets. The Klingon says that Vulcans are known as intellectual puppets of this Federation. Sarek asks if his vessel destroyed the USS Grissom, and he says their men killed Kirk’s son. The Klingon does not deny it, but he asserts their right to preserve their race. Sarek asks if they have the right to commit murder. People react, and the Federation Council President (Robert Ellenstein) tells them to be quiet. Sarek says he is there to defend the accused. The Klingon charges personal bias because his son was saved by Kirk. The President says the deliberations are over. The ambassador asks if Kirk is to go free, but the President says Kirk has been charged with nine violations of Starfleet Regulations. The Klingon says that is outrageous and threatens that there will be no peace as long as Kirk lives.
Kirk (William Shatner) records in his log that they are in the third month of their Vulcan exile. Dr. McCoy has suggested they rename the captured Klingon ship Bounty. Kirk asks McCoy (DeForest Kelley), Scotty (James Doohan), Uhura (Nichelle Nichols), Chekov (Walter Koenig), and Sulu (George Takei) and finds that they all support his plan to return to planet Earth to face the consequences of their actions in the rescue of their comrade Spock. Kirk asks Scott when they will be ready to go, and he says that he needs one more day. Though damage control is easy, reading Klingon is difficult. McCoy complains to Kirk that they have to make the return trip in the stinking Klingon ship; but Kirk says they could learn from its cloaking device that cost them much. Kirk sees Spock on a mountain top.
Spock (Leonard Nimoy) goes inside and tells the computer to resume testing. After much scientific discussion, the computer asks him several times how he feels. Spock replies that he does not understand the question. He sees Amanda (Jane Wyatt) who says that the computer knows he is half human. He says the question is irrelevant. She says his mind was trained in the Vulcan way, and so he may not understand feelings; but as her son he will have them, and they will surface. He realizes that she values them but says he cannot wait there to find them. She asks why, and he says he has to go to Earth to testify. She says he does this for friendship. He says he does it because he was there. She asks if the good of the many outweighs the good of one. He accepts that as an axiom. She says he stands there because of a mistake made by his human friends who are flawed feelings. They sacrificed their future because they valued him more than many. He concludes that humans make irrational decisions, and she admits it.
On the Saratoga they realize that something is coming, and the captain orders the shields up. The lights go out, and she asks for emergency lights and a damage report. Dim lights come on, and an officer reports that all systems failed and that they are functioning on reserve systems. The captain tries to call Starfleet Command.
Near the Golden Gate Bridge in an office the President asks Admiral Cartwright (Brock Peters) for a status report, and he says it is not good and points to a screen. He says the probe is coming directly toward them. Its signal is damaging whatever is in its path, and the Klingons have lost two vessels. Two starships and three smaller vessels have been neutralized, but they don’t know how. He calls the Yorktown, and a man says it has been three hours since they contacted the alien probe, and they have not regained power. Cartwright says it is using forms of energy their best scientists do not understand. The President says they need protection, and Cartwright says they are launching all they have. The Yorktown is deploying a makeshift solar sail to try to generate some power to survive.
Inside the Bounty Kirk asks for a systems report on communications, and Uhura says the communications officer is as ready as she will ever be. Sulu says guidance is functioning. Kirk asks Chekov about weapons systems, and he says the cloaking device is operational. Kirk is impressed with what they accomplished, and Chekov says they are in an enemy vessel and do not want to get shot down on the way to their own funeral. Kirk asks Scott who says they are ready in the engine room, and he replaced the Klingon food packs that were giving him a stomach ache. Kirk orders them to prepare to depart. Kirk says goodbye to Lt. Saavik (Robin Curtis) who tells him that his son David died bravely while saving Spock and the rest of them.
Spock comes in. Lt. Saavik wishes him a safe journey, and he tells her to live long and prosper. Spock asks Kirk for permission to come aboard, and he grants it. Kirk tells him to call him Jim, but Spock says it would not be proper to do so while he is in command. He apologizes for not being in his uniform. Kirk orders him to his station, and Spock walks away. McCoy asks Kirk if this is a good idea after what happened. He advises that Spock is not fully operational. Kirk says he will come back, and he sits down and orders Sulu to take them home. Sulu says thrust is functioning, and the ship lifts up and flies off .
A ship gets an order from Starfleet to launch all vessels; but they report back the space dock is not functioning because they have lost all internal power.
Sulu reports that they will reach Earth in about 1.6 hours. Kirk asks Chekov if there is any sign of a Federation escort, and he says no. He says there are no Federation vessels on assigned patrol stations. Kirk says that is odd. He turns to Uhura who says she is getting a lot of gibberish.
McCoy sits down next to Spock and asks if he is busy. Spock says Uhura is busy and that he is monitoring. McCoy says he is glad that Spock’s katra is back in his head. He could carry his soul, but he could not fill his shoes. Spock does not understand what he means by shoes. McCoy asks if they can talk philosophically about life and death; but Spock says he does not have time for that. McCoy says he went where no man has gone and would like him to tell him about it. Spock says he could not do so without a common frame of reference. McCoy says he is joking, and Spock replies that a joke is a story with a humorous climax. McCoy asks if he has to die to learn his insights on death. Spock asks to be excused because he is receiving many distress calls. McCoy does not doubt it and walks away.
The President and Cartwright learn that the storm raging has caused the clouds to increase to 100% over Tokyo and Leningrad, and temperature is decreasing rapidly. The President asks what is the current cloud cover on Earth and is told it is 78.6%. Cartwright orders a red alert sent to all stations, and he orders power switched to emergency reserves. He tells the President they cannot survive without the sun. The President knows that and tells ambassador Sarek he is trapped with them because they are not able to answer this probe. Sarek says it is hard to answer if one does not understand the question. He suggests he send out a planetary distress signal while they still have time.
Uhura tells Kirk a message is coming from the Federation. The President warns them not to approach the Earth because the transmissions of an orbiting probe are causing critical damages, ionizing their atmosphere. Their power is failing, and all orbiting spaceships are powerless. The probe is also vaporizing the oceans. They cannot survive unless they find a way to respond to the probe. He advises them to save their energy and themselves and to avoid the planet Earth at all costs. They are shaken, and Kirk asks to hear the probe’s transmission. Uhura puts it on the speakers. They hear music. Spock says it is unusual and is an unknown form of energy of great power and intelligence. He concludes that it is apparently unaware that its transformations are destructive because he would consider that illogical. McCoy asks if he thinks they are trying to say hello to humans. Spock says there are other forms of intelligence on Earth and that only arrogance would assume it is meant for man. He notes that the President said it is being directed at the oceans. Kirk asks Uhura to modify the probe to account for the factors of density, temperature, and solidity. She says she will try. The sound changes, and she assures Kirk that this is what it would sound like under water. Spock says if his suspicion is correct, they cannot respond to this message. He goes to test his theory. Kirk follows him, and McCoy insists on going too.
Spock checks various species and says that they are the songs of whales as he suspected, specifically the humpback whales. McCoy asks who would send a message millions of miles to whales. Kirk says whales were on Earth much earlier than man. Spock says it was ten million years earlier, and humpbacks were hunted by men and became extinct in the 21st century. He suggests an alien may have sent a probe to find out why they lost contact. Kirk asks if the humpback response could be simulated. Spock says the sounds could be but not the language. They would be sending gibberish. Kirk asks if humpbacks exist on any other planet, and Spock says they only know of them on Earth in the past. Kirk says they must destroy the probe before it destroys the Earth. Spock says that would be futile because the probe could easily neutralize them. Kirk assumes there must be an alternative. Spock suggests that they could attempt to find some humpbacks on Earth in the past, though he cannot guarantee success. Kirk orders Spock to start his computations for time warp, and he tells Bones to go with him.
In the Federation headquarters they are attempting to respond during the red alert.
Kirk asks Scotty if the room they are in could hold water, and he says it could. Kirk says they have to find some humpback whales that weigh about forty tons. McCoy asks Kirk if he is going to try to time travel in this “rust bucket.” Kirk says they did it before. McCoy says you can slingshot around the sun to get into time warp; but if you miss, you are fried. He summarizes the plan to go get a humpback whale and bring it back to communicate with the probe. He calls it crazy, but Kirk asks if he has a better idea.
Kirk asks Uhura to get him in contact with Starfleet Command.
Cartwright watches the garbled message from Kirk who says they are going to attempt time travel. A window breaks, and they hear the storm.
Spock says the computer is ready, though he had to program some variables from memory. They are aiming for the late 20th century and the Pacific basin. McCoy asks that “angels and ministers of grace defend us,” and Spock says that is from Hamlet, act 1 scene 4. Kirk is impressed with Spock’s memory. He orders computers engaged and preparation for warp speed. He orders shields and asks that fortune favor the foolish. He orders warp speed, and Sulu says the levels they attain. The ship shakes, and Chekov says the heat shield is at maximum. Kirk says they need breakaway speed. They see images of people and whales and hear their sounds.
Kirk wakes up and calls to Sulu to wake up too. They see the Earth. Spock says based on the pollution content he believes it is the second half of the 20th century. Kirk commends him. Spock advises him that they are probably already visible to the tracking devices of the time. Kirk orders Chekov to engage the cloaking devices. Spock says they are approaching the west coast of North America. Uhura says she is receiving whale songs, and Kirk tells her to put them on speakers. She says the song is coming from San Francisco. Scotty tells Kirk they have a serious problem, and he asks him to come down.
Scotty shows Kirk the Klingon crystals and says the time travel drained them. They are decrystallizing. Kirk asks him to estimate how long they have. Scotty answers about 24 hours staying cloaked. Then they will be visible and dead in the water. They won’t have enough power to break out of Earth’s gravity, not to mention getting home. Kirk asks if they can recrystallize dilithium. Scotty says they can’t even do that in the 23rd century. As they walk away, Spock tells Kirk they may be able to get some help on Earth. In this time they had some nuclear reactors that used fission for power but had toxic side effects before these were replaced by fusion. He says they still may have some operating. Kirk asks about the toxic problem. Spock says they could construct a device to collect their high-energy photons safely, and they could be injected into the dilithium chamber to recrystallize the structure. Kirk asks where they would find these reactors. Spock says nuclear power was used in naval vessels.
Sulu sees San Francisco and says he was born there. Kirk orders him to set them down in Golden Gate Park. Kirk says they will divide into teams. Uhura and Chekov are to assemble the uranium. McCoy, Scotty, and Sulu will convert the engine room to a whale tank. Kirk says he and Spock will try to find the whales. Uhura says she will have bearing and distance for him. Kirk advises them this is unknown land and that many customs may surprise them. He concludes that none of these people have ever seen an extra-terrestrial. He looks at Spock who tears a white band from his robe and ties it around his forehead. Kirk warns them this is a primitive and paranoid culture. Chekov will issue them a phaser and communicator for each team. They will maintain radio silence except for emergencies. Those in uniform are to remove their rank insignia. He asks for questions and tells them to get going. He says their own world is waiting for them to save it if they can. He orders landing procedures to commence.
The ship is coming in at night. Two men are picking up garbage cans and suffer strong winds suddenly. Over a lawn they see some lights, and a door opens with a ramp extending and being lowered to the ground with people beginning to come out. One asks if the other saw that, and the second says neither of them did. They drive away on the garbage truck. As they come down to the ground, Kirk tells them all to remember where they parked.
In daylight Kirk walks in front of a taxi that has to stop suddenly. The cab driver tells him to watch where he is walking and calls him a “dumb ass.” Kirk returns the insult and leads the six across the street in traffic. They see a woman buy a newspaper from a box. McCoy says it is a miracle they ever got out of the 20th century. Kirk says they are still using money, and they have to find some. He goes with Spock and tells the others to break up. Only Scotty and Uhura are wearing uniforms.
In an antique store Kirk asks how much he can get for some glasses that McCoy gave him. The man says he will give him $100. Kirk asks if that is a lot.
On a street corner Kirk distributes money to the others and tells them not to splurge. As they walk, Kirk asks Spock how they are going to find the humpback whales. Spock looks at a map displayed and says he has the coordinates from Uhura. Kirk sees a sign on a bus for the whale show at the Cetacean Institute in Sausalito and tells Spock about it. They get on the bus and get back off. Spock asks what “exact change” means.
McCoy asks Scotty how he plans to create the tank, and he says he would normally use invisible aluminum; but Sulu says they are too early for that. They see an ad to find things in the yellow pages.
Chekov has looked in a phone book and tells Uhura that he found it under US Government. In his Russian accent he asks a policeman to direct him to the Naval base at Alameda where they keep the nuclear vessels. The policeman says nothing, and they ask other people. A woman says Alameda is across the bay.
On a bus a punk rocker is listening to his boom box, and Kirk asks if he would mind stopping that noise. He turns it up. Kirk and Spock look at each other. Kirk asks him again, and he gives him the finger. Spock puts his hand on the man’s neck, and he becomes unconscious; his head falls on the boom box stopping the music. People on the bus applaud and are happy. Kirk tells Spock not to call him admiral, but Jim. Spock says he noticed that Kirk’s language has become laced with more colorful metaphors. Kirk says they talk that way here. He says no one pays attention unless you swear a lot. It is found in the literature of the period such as in the novels of Jacqueline Susann and Harold Robbins.
Kirk and Spock get off the bus and go into the Cetacean Institute. Gillian (Catherine Hicks) walks over to a group of people and introduces herself as their guide. She says this is the only institute in the world exclusively devoted to whales, but there is much they don’t know about whales. She explains they are not fish but mammals like humans. Asked if they attack people, she explains that most whales have no teeth. Their gums strain shrimp for food. She says their principal enemy is much more hostile, and Kirk says she means man. She says men have harvested whales for many things; but most of those things can now be obtained synthetically. Two centuries ago they killed many with harpoons; but recently whales have been hunted to the brink of extinction. The largest creature ever on Earth, the blue whales, are nearly gone. Despite attempts to ban whaling, several countries and pirates still slaughter whales. She says that today there are less than 10,000 humpback whales alive. Spock says that to hunt a species to extinction is not logical. She asks whoever said that humans are logical. She asks them to follow her so that she can introduce them to the Institute’s pride and joy.
Outside she shows them the largest seawater tank in the world which contains the only two humpback whales in captivity. She says they are mature and weigh 45,000 pounds each. She says they call them George and Gracie. Kirk tells Spock they are perfect. They could beam up a male and a female. She asks if they are beautiful and says they are extremely intelligent. As they walk she says they are going to return them to the sea because they cannot afford to feed them two tons of shrimp a day. Kirk asks how soon, and she says soon. They are very friendly, and she has become attached to them. She shows them the two whales through glass windows under water. They are hearing a recording of a male whale singing. She says their songs change every year. She asks if they are a navigational signal or part of the mating ritual or something they do not comprehend. Someone is swimming with the whales in the tank, and Kirk notices that it is Spock. She is shocked to see him in there and leaves the group, telling them to wait.
Kirk follows her up the stairs. As Spock gets out of the tank, she asks him what he is doing. He says he was trying to communicate. She says he has no right to be there. Kirk steps forward and says he heard the lady. Spock calls him admiral and says that if they assume these whales are theirs to do what they want with, they would be as guilty as those who caused their extinction. She says she does not know what this is about; but she warns them to leave now, or she will call the cops. Kirk says that won’t be necessary because they are there to help. She disagrees, and says his friend was messing up her tanks and her whales. Spock says they like her very much, but they are not her whales. She asks if they told him that, and he replies the hell they did.
As they are walking near the Golden Gate Bridge, Kirk advises Spock not to use those colorful metaphors anymore because he has not got the knack of it. Also he says it is not always necessary to tell the truth. Spock says he can’t lie, but Kirk suggests he could exaggerate. He asks what else he learned from his mind meld. Spock says their species is unhappy about how man has treated them. He believes he was successfully communicating their intentions.
At the whale tank Gillian talks to the whales and says they did not mean any harm. A man comes over and says he heard there was some excitement. She says they were just a couple of kooks. Bob asks how she is doing and tells her not to tell him fish stories. She admits it is tearing her apart. He feels frustrated too because they can’t keep them here without risking their lives, and letting them go is also dangerous. She says she knows. He says they are not humans, and he argues that it has not been proven that they are intelligent. She gets angry and says her compassion is not based on her estimate of someone’s intelligence. She walks off.
Uhura and Chekov walk on a rocky beach in sight of an aircraft carrier. They radio and tell Kirk that they are close to the reactor. Chekov tells the admiral he has found the nuclear vessel. He tells Kirk they will beam in tonight, collect the photons, and beam out. No one will ever know they were there.
Kirk approves the plan and tells him to keep him informed. Gillian is driving a pickup truck, sees Kirk and Spock, and stops. Kirk tells Spock they may be able to find out when the whales are leaving. She calls them Robin Hood and Friar Tuck and asks where they are going. Kirk says San Francisco, and she asks why they came down here. Kirk says he can’t really explain and says that Spock is harmless. Kirk says he was part of the free speech movement at Berkeley in the sixties, and he thinks he did too much LDS. She offers to give them a lift because she has a weakness for hard luck cases which is why she works with whales. Kirk says they don’t want to be any trouble. She says they already have and motions for them to get in. They get in the front seat. She warns them not to try anything because she has a tire iron. Spock denies that he was at Berkeley, and Kirk says he is from Iowa. She asks what they were trying to do. She hopes it is not the macho thing which she hates. Kirk asks her what is going to happen when she releases the whales. She says they will have to take their chances because they will risk being killed by whale hunters. She asks what they meant when they talked about extinction. Kirk tries to explain they might become extinct; but she says he used the past tense. Spock asks if it is time for a colorful metaphor, and she sighs. She asks if they are from the military and are trying to get whales to retrieve torpedoes or do dipshit stuff like that. Kirk says no dipshit. She is relieved because she would have let them off there. Spock says Gracie is pregnant, and Gillian slams on the brakes and stops. She asks who they are and tells them not to jerk her around. Kirk says he can’t tell her; but they are not from the military, and they intend no harm to the whales. He says they may be able to help her in ways she cannot imagine. She agrees she may not believe it. Kirk says she is not catching them at their best, and Spock says that is certain. Kirk suggests they would be happier discussing this over dinner. She asks if they like Italian. Kirk says yes, but Spock says no. Kirk says they love Italian and so does Spock who goes along.
The manager of the Plexicorp apologizes to McCoy and Scottie for the mix-up, and McCoy explains to Scotty that he told them about his visit there as a professor. Scotty acts angry and says he has come millions of miles. The manager offers to take them around the plant.
Sulu talks to a man who gets into a helicopter, and Sulu says he used to fly in the academy. He gets permission to ask some questions.
The manager goes into his office as he tells Scotty he is impressed by his knowledge of engineering. Scotty offers to help and says he noticed he is still using polymers. Scotty asks how thick his plexiglass would need to be at 60 feet by 10 feet to withstand the pressure of 18,000 cubic feet of water. The manager says six inches and says they carry it in stock. Scotty asks him to suppose that he could manufacture something one inch thick that could do the same job. The manager says he is joking. McCoy asks if Scotty could use his computer, and the manager says yes. Scotty sits down and calls to the computer twice. McCoy hands him the mouse, and Scotty talks into it. The manager suggests the keyboard, and Scotty says that is quaint. He types quickly as he does a chemical simulation. The manager looks at the molecular design which is called “transparent aluminum.” The manager says it would take years to figure out the dynamics of this matrix. McCoy says he would be rich beyond his dreams. Scotty asks if that is worth something to him, or should he punch up clear. The manager says no. A woman comes in, and the manager tells her not now with urgency. She turns around and goes out. The manager asks what they had in mind. McCoy asks for a moment alone and tells Scotty they would be altering the future. Scotty asks how they know he did not invent it.
Gillian stops the truck, and Spock gets out. She asks if he will change his mind, and he asks if there is something wrong with the one he has. Kirk says it is a joke and gets back in. She asks how he knew that Gracie is pregnant, and Spock says Gracie knows. He says he will wait on the lawn. She asks if he is going to hang around there while they eat. Kirk says it is his way. As she drives off, Spock dematerializes.
At the Italian restaurant she asks if he trusts her, and he says yes and orders what she is having. He says she is upset about losing the whales, and she says he is perceptive. He asks exactly how it will be done. She says they will be flown in a 747 to Alaska and be released there. He asks if that is the last they will see of them. She says they will tag them with radio transmitters on a special frequency so they can know where they are. He says he could take those whales where they would never be hunted. She laughs and says he couldn’t even get himself from Sausalito to San Francisco; but he says he is having dinner here. They drink beers, and she asks why he travels with that ditzy guy who calls him admiral. She asks where he could take them. He says it is not a place but a time. She says the time would have to be right now. He asks why, and she says no humpback born in captivity ever survived. The problem is they won’t be any safer at sea because of the hunting this time of year. She hears beeping, says he has a pocket pager, and asks if he is doctor. He answers and says he told him never to call him. Scotty says he thought he would like to know that they are beaming them in now. He tells him to have phasers on stun and wishes him good luck. She wants him to explain from the top, and he asks when those whales are leaving. She asks who he is, and he asks who she thinks he is. She smiles and says he is from outer space. He says he is from Iowa, but he only works in outer space. She says she knew outer space was going to come into this. He asks if she wants the truth. She says she is all ears, and he laughs. He says he is from the late 23rd century, and he came back in time to bring two humpback whales back with him to attempt to repopulate the species. She asks why he didn’t just say so. She decides to tell him that Gracie is very pregnant and that at noon tomorrow in a media circus the whales are getting shipped out. He gets up, and she asks if they are leaving. He says they don’t have much time. The waiter appears, and she asks for it to go. The waiter asks who gets the bad news, and she says he is going to tell her they don’t use money in the 23rd century. He says he doesn’t, and she takes the check.
On board the USS Enterprise aircraft carrier a German shepherd on a leash is sniffing around. Uhura and Chekov find the reactor.
Gillian drives back to the lawn and tells the admiral that that was the briefest dinner and biggest fish story she ever heard. Kirk says she asked. He asks her to tell him the radio frequency of the whales’ transmitters, and she says that is classified. She does not know who he is and asks if he would show her his spaceship. He says that is not his first choice. He says if he has to he will go to the open sea to get two whales; but it is better for him and her and for them if he gets them from her. He tells her to think about it and gets out. He asks her to think about it and says he will be here in the park. She drives off and hears an odd sound. She stops and looks back but sees no one there.
In the ship Spock tells Kirk the tank will be finished by morning, but there is no word from team two. Kirk says they have two whales, but chances are they will lose them. Spock says then the mission may fail. Kirk says he is talking about the end of life on Earth. He says Spock is half human and asks if he has any feelings about that.
Chekov and Uhura have their device on the wall of the reactor. Uhura calls Scotty and says they are ready to beam up.
The Navy commander learns that they are losing energy and calls to say that they have an intruder in number four.
Scotty says he can hardly hear them, and they are running out of power. He will have to bring them in one at a time. Uhura takes the collector and is beamed up. Chekov asks Scotty to come in. Scotty says he is breaking up and asks if he can hear him. Chekov says this would be a good time as men close in on him.
A man asks Chekov who he really is and what he is doing here. Chekov says his name and that he is a commander in the Starfleet of the United Federation of Planets. The man tells him to try it again from the top with his name. Chekov asks whose name. The man consults a colleague who says he is a Russkie. They agree, but the interrogator says he is a retard. When the other man says they had better call Washington, Chekov stands up, holds out his phaser, and tells them to lie on the floor, or he will have to stun them. The man says to go ahead. Chekov presses the button, but it does not work. He says it must be the radiation and runs out. They call a general alarm, and soldiers search in the ship. Chekov runs to the deck and falls down a floor. They call man down.
Uhura tells Kirk she should not have left him. Scotty tells Kirk it will be well into tomorrow before power is restored; but Kirk says he has to do better. Spock says Kirk is a man of deep feelings.
Gillian arrives at the Institute and sees the tank is empty. Bob tells her they left last night. He thought it would be easier on her. She slaps him and leaves in a hurry.
A helicopter piloted by Sulu is carrying a load and hovers over the park. Gillian arrives in the truck and gets out and calls for the admiral. She sees the helicopter and part of a man in the air. She runs on the lawn calling the admiral and bumps into an invisible object. Scotty alerts Kirk who sees her on a screen asking for his help. She screams as she is beamed into the spaceship. Kirk welcomes her and assures her that it is real. He shows her the storage tank for the whales, and she says they are gone. She says they are tagged, and he can find them. He says they can’t go anywhere because they are missing a man. Spock says full power is restored and welcomes Gillian aboard. Uhura calls and tells Kirk that she found Chekov and that they are taking him to Mercy hospital. Gillian knows where it is. Uhura says they do not expect him to survive. McCoy tells Kirk he has to let him go there because they can’t leave him in the hands of 20th century medicine. Spock agrees they must help Chekov. Kirk asks if that is logical. Spock says it is not logical, but it is the human thing to do. Kirk says right and asks Gillian if she will help them. She asks how, and McCoy says they will have to look like physicians.
In surgery gowns Kirk, Gillian, and McCoy walk in the hospital hall. McCoy stops to help a woman on kidney dialysis and asks if this is the dark ages. He gives her a pill to swallow. Kirk gets a paper and tells McCoy they have to go up a flight. They take a gurney, and Gillian lies on it. In the elevator two doctors talk chemotherapy and about conflicts between doctors, and McCoy says it sounds like the Spanish Inquisition.
Two police guards try to prevent them from entering the room, and Gillian cries out. McCoy says she has an acute condition, and they let the three in. A doctor asks who they are and why they are not masked. McCoy examines Chekov and starts treating him with his device near his head. The doctor calls him a dentist, and they discuss the symptoms and treatment. McCoy says drilling into his head is not the solution and begs him to let him repair his artery. That doctor says he is going to have him removed, but Kirk stops him and says that is unprofessional behavior. Kirk persuades the doctors and nurses to go into the next room. He uses his phaser to melt the doorknob so that they can’t get back in. McCoy puts his device on Chekov’s forehead and tells him to wake up. After a while Chekov wakes up and says he is an admiral. The three wheel Chekov out on the gurney and say he is going to make it. The police go into the room and discover the locked door. The doctor says they took the patient. The police run after them. The woman who got the pill says the doctor gave her a new kidney as a doctor says it is fully functional. They get in an elevator, and Chekov stands up. The police miss the elevator and go down the stairs. As the elevator door opens, they draw their guns and say freeze.
The four are beamed to the lawn. McCoy and Chekov go into the spaceship, and Kirk tells Gillian all he needs is the radio frequency of the whales. She says she is going with them. He says she can’t because they are going to the 23rd century. She does not care and wants to help those whales. He says he will not argue with her. He asks for the frequency, and she says it is 401 megahertz. He thanks her for everything and tells Scotty to beam him in. She jumps into his arms, and they disappear.
Kirk says she tricked him, but she says he needs her. Sulu says he is ready, and Kirk says now. They blast off, and two joggers are caught in the dust.
Kirk gives instructions to Sulu and tells Uhura to scan for the whales. Kirk orders full impulse power, and Sulu says they will reach the Bering Straits in twelve minutes. Kirk asks Scotty if the whale tanks are secure. Scotty says yes, but he has never beamed up 400 tons before. Kirk asks why so much, and Scotty says it is whales and the water.
McCoy asks Spock what his problem is. Spock explains the difficulty of returning to the same moment in time that they left in the 23rd century, McCoy says he will just have to give it his best shot or best guess. Spock says guessing is not in his nature, and McCoy says nobody is perfect.
They make contact with the whales, and Kirk tells Uhura to put it on the screen. Gillian identifies a whaling ship and asks if they are too late.
The ship captain sees the whales, and they go after them.
They fly over the ship and hover over it. The ship alarm bells go off, and they turn the ship around.
Kirk tells Scotty to beam them up. He does and says they can leave with full power. Kirk takes Gillian to see the whales in the tank. He says the sea is cold but that it contains the hottest blood of all. She says whales weep not which is from D. H. Lawrence. He says when man was killing these creatures, they were destroying their own future. Scotty says the beasts are glad to see her, and he hopes she likes their aquarium. She says it is a miracle, but Scotty says that is yet to come. Kirk explains that their chances of getting home are not too good. He says she might have lived longer if she had stayed where she belonged. She says she belongs here. She is a whale biologist and asks who in the 23rd century knows anything about humpback whales. They feel a jolt, and Scotty tells Kirk to get up there because of a power problem. Scotty tells her to hold on.
They are accelerating to breakaway speed, and Sulu says they have reached maximum speed. Spock says when. Kirk asks if the braking thrusters fired, and Spock says they did. Kirk asks where they are. Spock says the computers are not functioning. Kirk orders them to switch to manual controls.
Admiral Cartwright says to get him back. He says they are heading toward the bridge.
The ship crashes in the ocean, and Kirk orders the hatch pulled. He tells Scotty to move. They climb out the hatch on to the outside of the spaceship in the water. Scotty reaches out his hand for Gillian, and Kirk helps her climb out. Kirk tells Scotty to go ahead. Kirk dives under water and opens the tank. Spock and the others are outside. Gillian and the others see the whales swim by. Kirk asks why they don’t answer or sing.
The two whales dive deep and begin to sing.
The probe responds by turning. The sound of the probe is still heard. The whales sing, and the probe pulls in its transmitter. The whales continue to sing while the probe goes away. The whales swim by the ship, and they see them.
Those at the Federation headquarters find their power is restored.
The whales play in the water. Gillian and the others swim in the sea. A space craft flies toward them.
The Federation council is called into session, and the President orders the accused brought in. Kirk, McCoy, Scotty, Sulu, and Uhura file in, and Spock joins them from the audience. The President says that Spock is not accused, but he says he stands with his shipmates. The President says the charges are conspiracy, assault on Federation officers, theft of Federation property being the USS Enterprise, sabotage of the USS Excelsior, willful destruction of Federation property, and disobeying the direct orders of the Starfleet Commander. He asks Admiral Kirk how he pleads, and he says he is authorized to plead guilty on behalf of all of them. The President says that because of mitigating circumstances all charges but one are summarily dismissed. The remaining charge of disobeying orders is directed only at Kirk. The President is sure that Kirk realizes the need to maintain discipline, and he says he does. The President says that it is the judgment of this Council that he be reduced in rank to captain and that he be given duties for which he has exceptional ability which is the command of a starship. The President says that he and his crew have saved this planet from its own limited vision, and they are forever in their debt. People applaud. Gillian comes to Kirk and says she is so happy for him, and she thanks him. He asks where she is going. She says he is going to his ship, and she is going to hers to catch up on three hundred years of learning. He asks if this is goodbye. She asks why it has to be goodbye. He says in her terms that he doesn’t even have her telephone number. They laugh, and he asks how he will find her. She tells him not to worry because she will find him. She kisses him on the cheek and says she will see him around the galaxy.
Sarek tells his son Spock goodbye and says he is most impressed by his performance. Spock says he is most kind. Sarek recalls that he opposed his enlistment in Starfleet, and he admits he may have been incorrect. He says his associates are people of good character. Spock says they are his friends. Sarek asks if he has a message for his mother, and Spock says to tell her that he feels fine. Spock makes the Vulcan salute and wishes his father to live long and prosper. His father returns the salute and the greeting. Spock and Kirk walk out together.
McCoy tells the others that the bureaucratic mentality is the only constant in the universe. He predicts they will get a freighter. Sulu says he is counting on the Excelsior, but Scotty asks why he would want that bucket. Kirk says a ship is a ship. They see that they are being taken to the USS Enterprise, and Kirk says they have come home.
On the Enterprise Kirk tells Sulu to show them what she has.
This science fiction adventure brings the more advanced humans back to the current era to reveal the contrasts in ethics, culture, science, and technology. A spiritual theme is that humans need to realize that there may be other species on Earth with even greater intelligence whom they are abusing with their unfettered power and greed.