During 1964, in the months following World War III, the conflict has devastated the Northern Hemisphere, polluting the atmosphere with nuclear fallout, killing all life there. Air currents are slowly carrying the fallout south; the only areas still habitable are in the far reaches of the Southern Hemisphere.
From Australia, survivors detect an incomprehensible Morse code signal coming from the West Coast of the United States. The last American nuclear submarine, USS Sawfish, under Royal Australian Navy command, is ordered to sail north to the United States to attempt to make contact with the sender of the Morse signal. The submarine is commanded by Captain Dwight Towers (Gregory Peck), who must leave his new friend, the alcoholic Moira Davidson (Ava Gardner).
The Australian government arranges for its citizens to receive suicide pills or prepared injections so they may end things quickly before there is prolonged suffering from radiation sickness. An Australian naval officer, Peter Holmes (Anthony Perkins) and his wife, Mary, who is in denial about the impending disaster, have a baby daughter. Assigned to travel with the American sub for several weeks, Peter tries to explain to Mary how to euthanize their baby and then kill herself in case he is not yet home when the end comes; Mary reacts very emotionally at the prospect of killing her daughter and herself.
One scientist's theory is that the radiation level near the Arctic Ocean could be lower than that found at the mid-Northern Hemisphere, which might indicate the radiation could disperse before reaching the Southern Hemisphere. The theory is to be explored along with the submarine's main mission. After sailing to Point Barrow, Alaska, they determine that radiation levels are, on the contrary, intensifying.
The next day, the Sawfish arrives in the San Francisco Bay Area, just off San Francisco. Through the periscope, Captain Towers sees that while the city has escaped nuclear annihilation due to anti-missile defenses during the war, there appears to be no sign of any human life. Ralph Swain, one of the crewmen of the sub who has family in San Francisco, defies Captain Towers' orders by leaving the sub and going ashore into the city to look for his family, in the hopes that they've survived the radiation fallout and are still alive.
The next morning, through a speaker from the Sawfish while he's fishing from a boat in the bay, Swain tells Captain Towers that while he did find his family, they are all dead like everybody else, apologizes for defying him, and announces his decision to spend the rest of his last days on Earth in San Francisco (with the assurance that he can just go to San Francisco's many drugstores if he gets sick). Captain Towers understands Swain's motives and forgives him (even adding that there are no laws as to when Swain will eventually succumb to radiation sickness), but explains that they won't be coming back and so Swain watches as the Sawfish surfaces and leaves for San Diego, its next port of call.
Near San Diego, the source of the signals, communications officer Lieutenant Sunderstrom goes ashore in a radiation and oxygen suit. He has only three hours and will be alerted by a siren from the sub every hour. He discovers that the mysterious signal comes from a power station, but it is not a human survivor â- just a tilted Coca-Cola bottle hanging by its neck from an open window shade's pull cord; random ocean breezes bump the bottle against a "live" telegraph key to send the random signals. Sunderstrom stands the bottle upright and uses proper Morse Code to send a message describing the bleak situation. He returns to the sub before the third hour is up.
Sawfish and her crew return to Australia and try to enjoy what pleasures remain to them before the end. Scientist Julian Osborn (Fred Astaire) wins the Australian Grand Prix in which many racers, with nothing left to lose, die in various accidents. Dwight and Moira embark on a weekend fishing trip in the country. Retreating to the resort for the night, they share a romantic interlude inside their room as, outside, a gathering storm howls. Returning to Melbourne, Towers learns one of his crew has developed radiation sickness; the deadly radiation has arrived in Melbourne.
Osborn kills himself by carbon monoxide poisoning in his closed garage, with his race car's engine running. Others line up to receive their suicide pills. Mary Holmes becomes emotionally unbalanced and must be sedated. Later, she regains lucidity in time for her, Peter and their baby daughter to face the end by consuming the fatal drug.
Dwight wants to stay with Moira but many of his remaining crew want to head for home to die in the US; Commander Towers chooses his duty over his love for Moira and joins his crew as they attempt to make it back to the radioactive ruins of America. Moira watches as the USS Sawfish leaves Australian territorial waters and then submerges for the final voyage home.
Within a few days, the last pocket of humanity is dead and Melbourne is entirely deserted. The deserted, windblown streets of Melbourne are punctuated by the rise of dramatic, strident music over a single powerful image of a previously seen street banner that pleads to the world, to the future: "There is still time... Brother". Nuclear war and the end of humanity can still be prevented.
What does the siren signal?
An hour passed the siren signal every hour for three hours.