The year is 1964. The nuclear war that was waged in the northern hemisphere has ended. An American nuclear submarine, The Sawfish, at sea in the mid-Pacific makes its way down the coast of Australia where there appear to be survivors. Docking at the port of Melbourne, the crew, commanded by Lt. Commander Dwight Towers (Gregory Peck) live out their lives waiting for the radioactive winds from the North to slowly make their way towards them, ending all life as we know it.
The Australian Government and scientific community, hopeful that life might go on in the Southern Hemisphere or in Antarctica, ask Towers and his crew to take the sub north again to check on radiation levels and a mysterious Morse code signal emanating from near San Diego, CA. Towers is assigned an Australian Ensign (Anthony Perkins) who will act as liaison officer for the mission. Feeling sorry for Towers and the loss he has experienced up North, Perkins and his wife Mary (Donna Anderson), throw a party. They bring in a friend Moira Davidson (Ava Gardner) to distract Towers so he won't become morbid and depressed. Towers slowly begins to fall in love with Moira. However, he still has the mission to think of and is still very much devoted to his wife and kids, who resided in Connecticut. He has difficulty reconciling their loss and at one point confuses Moira for his late wife, Sharon. Moira offers to become "Sharon" if it will help him deal with it and also serve the purpose of assuaging her loneliness and fear of the future, impending doom awaiting. Towers refuses. He leaves on the mission north without telling Moira. She finds out from her cousin Julian Osborne (Fred Astaire in his first dramatic role,) who will be serving as a scientist checking on the radiation levels during the mission. The Sawfish first arrives at Point Barrow in the Artic Sea, only to find that the radiation levels have not subsided. Next they visit an untouched but ghostly quiet, San Francisco. One of the crew, yeoman Swain, whose hometown is San Francisco, escapes the sub through an escape hatch and swims ashore. The Sub sits on the bottom of San Francisco bay and then the next morning surfaces to find Swain fishing from a small boat. Swain tells Captain Towers he is sorry that he deserted but he would "rather be here [sic. San Francisco] to have it" then in Australia later on. Towers understands. The Sawfish heads south to the San Diego area and puts a Radio Officer, Lt. Sunderstrom ashore in a full radiological suit with oxygen tank. Sunderstrom discovers that the mysterious morse code signal is coming from a silent radio room at a refinery, where the window pane had broken and a window shade pull cord had wrapped around a partially empty Coca-cola bottle and a morse code key thus generating the gibberish Morse code signals. Sunderstrom signals the sub as to what he has found and then shuts down the main generators at the refinery. Resigned to their fate, the Sawfish returns and Towers meets up with Moira at her father's farm. They spend time together and go to the last Australian Grand Prix, where Osborne is racing. Osborne wins which has been his dream and Towers and Moira head off to go fishing, as the fishing season has opened early. The fishing grounds are crowded with people and they spend a stormy evening together having dinner in their room in an inn. In the background one can the hear the very audible singing of drunken locals singing the tune "Waltzing Matilda" in the barroom below. Returning from the fishing trip, Towers learns that one of his crew, Seaman Ackerman, has developed radiation poisoning. The radioactive-laden winds have finally arrived and he now must consider what he is going to do about his crew and about Moira. With little time left, Towers says goodbye to Osborne and speaks to his crew. They have already taken a vote and they tell him that they would like "to head for home." He realizes his responsibility and duty is to his crew. He phones Moira who has been helping Peter deal with Mary who can't accept the reality of their present situation. Upon learning that Towers is leaving, she speeds off in her car to the Naval Base. Mary comes around and realizes that she and Peter must face their end and that their infant daughter "Jennifer" will never have the chance to experience the love and happiness that she has had. She tells Peter that she has had a good life with him and that she will "have that cup of tea now." The tea is laced with a coma-inducing sedative, provided free to the residents of Melbourne by the government to help them deal painlessly and quickly with the end. Moira finds Towers at the dock and embraces him. He tells her he loves her but has to go with his crew. She realizes that their relationship is now over but is thankful for what they had. She speeds her car along the coast so that she can catch sight of Towers as he takes the Sawfish down for one last time. Standing on a cliff she gazes off into the distance as the submarine submerges. The final scenes are of an empty and desolate Melbourne with a banner from a religious gathering at the city's center. The banner prophetically reads "There is still time...brother." The final shot is a closeup of the banner. The movie ends.