On a routine trip to Mars, the passenger liner Johannes Kepler is hit by a meteorite, killing the captain and almost all the senior members of the crew and resulting in the loss of much of the ship's breathable air. Lieutenant Donald Chase, a junior medical officer, finds himself the highest-ranked surviving crew member and has to take over the running of the ship. He is helped by Chief Petty Officer Kurikka, who is familiar with the technical aspects; the Mexican scientist Dr Ugalde, a passenger whose mathematical genius enables the new crew to navigate the ship; and various others. Chase solves the air shortage by using the oxygen content of some of the ship's water. Once the situation has stabilised, a passenger, General Mathew Briggs, who had criticised Chase's methods, overthrows him by force with the apparent help of Ugalde. However, it turns out that Ugalde had only pretended to shift his loyalties and Briggs is faced down by Kurikka, defeated and imprisoned. The ship's occupants are also struck by a deadly plague carried by the meteorite, but Chase and his medical colleagues eventually find a cure, although Chase collapses from disease and exhaustion. Recovering in hospital after the ship has docked safely, he is presented with a captain's cap by his crew.