England, 1940. The oil tanker San Demetrio London lies at anchor waiting to sail for America. As the whistle blows, engineer John Boyle hurriedly finishes a letter to his wife, Jean, and just manages to hand it to a shorebound official. The San Demetrio moves off. In the engine room, Boyle gives his keen young brother-in-law, Jamieson, a tour, but is interrupted by the Chief Engineer, who sends Jamieson back to the mess hall.
Galveston, Texas. The San Demetrio takes on its load of oil, and the Captain goes ashore seeking deckhands. He rejects one man, Preston, as a 'non-belligerent' American, but relents when Preston claims to be Canadian. Preston spends his advance in a bar, where he unwittingly encounters the ship's Bosun. When he turns up for duty, drunk, he is met by the Bosun. Later, the Bosun sets Preston, now dubbed 'Yank', to work painting the funnel.
The tanker and its escort come under U-boat attack. The crew watches helplessly as another ship in its convoy is hit and sunk. The San Demetrio seems like it might be clear of danger when it takes a hit, then another, puncturing one of the oil tanks and causing a fire. The Captain gives the order to abandon ship.
The first two lifeboats, including the Captain and the first mate, are picked up by another ship, but the last, with the Chief Engineer and 2nd Officer Hawkins on board, remains afloat. After several days in the lifeboat, the crew are in poor shape: cold, wet, underfed and in fading health. Hopes take a blow when what appears to be a plane in the night sky turns out to be Jupiter. Eventually, they spot a ship. As they approach, they realise it is on fire - it is the San Demetrio, somehow still afloat. After some discussion, the men agree to reboard. Several men are assigned to put out the fires. Meanwhile the Chief checks the engine room.
They suffer a setback when the lifeboat slips away as they try to bring it aboard, taking the remaining supplies with it. Meanwhile, the fires prove resilent, until the Chief manages to power the hoses. Spirits begin to lift, although they are forced to endure cold water and cold vegetables, until the Chief takes a chance on lighting the stove and boils tea.
The men wait for rescue. But after clearing out the engine room, the Chief concludes that despite much damage it might be possible to get the engines going. While the Chief and his men work on the steering gear, Hawkins consults the others about their course. All but one agree to head East, hoping to reach Britain. Eventually the engines start and, estimating their course by the position of the Sun, the men head off.
In the engine room, Boyle, already unwell, collapses and is put to bed. The Chief nominates Jamieson to take his place in the engine room, to the lad's delight.
As they run into rougher waters, the tanker is dangerously heavy at the bough; the Chief suggests transferring some of the oil to even the load. Meanwhile Yank performs some amateur surgery on the Chief's injured finger. The Chief and Taff brave oil fumes to release the valves to allow the oil to run through.
The men are cold and worn out, living on cold vegetables, but with fumes everywhere they dare not risk a fire. Jamieson scalds his hand in the boiler room, inspiring the Chief to use the heat to boil water for cooking. The men's spirits improve with the hot meal, but it's too late for Boyle. He is given a makeshift burial at sea.
Finally, they reach Ireland's West coast, and the Admiralty sends a tug. However, unknown to the crew, they stand to win substantial salvage money - provided they return the vessel unassisted. In the end, the crew decline the tug's help, preferring to finish the journey unaided.
Back on dry land, a court awards salvage moneys totalling £14,700 to be shared among them; the judge praises their bravery. The crew requests that the Red Ensign be presented to Yank as a token of gratitude.