The captain goes down with the ship

"The captain goes down with the ship" is the maritime tradition that a sea captain holds the ultimate responsibility for both the ship and everyone embarked on it, and in an emergency they will devote their time to save those on board or die trying. Although often connected to the sinking of RMS Titanic in 1912 and its captain, Edward Smith, the tradition precedes Titanic by several years. In most instances, captains forgo their own rapid departure of a ship in distress, and concentrate instead on saving other people. It often results in either the death or belated rescue of the captain as the last person on board.
The tradition is related to another protocol from the 19th century: "women and children first". Both reflect the Victorian ideal of chivalry, in which the upper classes were expected to adhere to a morality tied to sacred honor, service, and responsibility for the disadvantaged. The actions of the captain and men during the sinking of HMS Birkenhead in 1852 prompted praise from many, due to the sacrifice of the men who saved the women and children by evacuating them first. Rudyard Kipling's poem "Soldier an' Sailor Too" and Samuel Smiles's book Self-Help both highlighted the valour of the men who stood at attention and played in the band as their ship was sinking.
The tradition says that the captain should be the last person to leave their ship alive before its sinking, and if they are unable to evacuate the crew and passengers from the ship, the captain will refuse self-rescue even with an opportunity to do so. In a social context, especially as a mariner, the captain will feel compelled to take this responsibility as a social norm.
In maritime law, the ship's master's responsibility for their vessel is paramount, no matter what its condition, so abandoning a ship has legal consequences, including the nature of salvage rights.
Abandoning a ship in distress may be considered a crime that can lead to imprisonment. Captain Francesco Schettino, who left his ship in the midst of the Costa Concordia disaster of 2012, was not only widely reviled for his actions, but received a 16-year sentence including one year for abandoning his passengers. Abandoning ship has been recorded as a maritime crime for centuries in Spain, Greece, and Italy. South Korean law may also require captains to rescue themselves last. In Finland, the Maritime Law (Merilaki) states that the captain must do everything in their power to save everyone on board the ship in distress, and that unless the captain's life is in immediate danger, they shall not leave the vessel as long as there is reasonable hope that it can be saved. In the United States, abandoning the ship is not explicitly illegal, but the captain could be charged with other crimes, such as manslaughter, which encompass common law precedent passed down through centuries. It is not illegal under international maritime law.
In some cases the captain may choose to scuttle the ship and escape danger rather than die as it sinks. This choice is usually available only if the damage does not immediately imperil a vast portion of the ship's company and occupants. If a distress call was successful and the crew and occupants, the ship's cargo, and other items of interest are rescued, then the vessel may not be worth anything as marine salvage and be allowed to sink. In other cases a military organization or navy might wish to destroy a ship to prevent it being taken as a prize – typically an abandoned warship would be torpedoed to make sure it sinks before an enemy can arrive to board it. Commodities and war materiel carried as cargo might also need to be destroyed to prevent capture by the opposing side.
In other cases a captain may decide to save themselves to the detriment of their crew, the vessel, or its mission. A decision that shirks the responsibilities of the command of a vessel will usually bring upon the captain a legal, criminal, or social penalty, with military commanders often facing dishonor.
When used metaphorically, the "captain" may be simply the leader of a group of people, "the ship" may refer to some other place that is threatened by catastrophe, and "going down" with it may refer to a situation that implies a severe penalty or death. It is common for references to be made in the case of the military and when leadership during the situation is clear. So when a raging fire threatens to destroy a mine, the mine's supervisor, the "captain", may perish in the fire trying to rescue their workers trapped inside, and acquaintances might say that they went down with their ship or that they "died trying".
In other metaphorical use, the phrase "Going down with the ship" may imply a person who is displaying stubborn defiance in a hopeless situation, even if this situation is not a matter of life and death. For example a stockholder might say "This company is on the verge of going bankrupt, but I'm not selling my stock. I'm going down with the ship."
The concept has been explicitly extended in law to the pilot in command of an aircraft, in the form of laws stating that they "[have] final authority and responsibility for the operation and safety of the flight". Jurisprudence has explicitly interpreted this by analogy with the captain of a sea vessel.
This is particularly relevant when an aircraft is forced to ditch in the ocean and becomes a floating vessel that will almost certainly sink. For example, following the water landing of US Airways Flight 1549 on the Hudson River in 2009, pilot in command Chesley Sullenberger was the last person to exit the partially submerged aircraft, and performed a final check for any others on board before doing so. All 155 passengers and crew survived.
Similarly, on October 16, 1956, Pan Am Flight 6 was a Boeing 377 Stratocruiser (en route from Honolulu to San Francisco) that was forced to ditch in the Pacific Ocean due to multiple engine failures. The airliner broke apart when one of its wings collided with a wave swell. Airline Captain Richard N. Ogg was the last to exit the airplane during the successful mid-ocean ditching and rescue of all 31 on board by the US Coast Guard cutter USCGC Pontchartrain. The airplane fuselage sank with no one on board a few minutes later.
Kohei Asoh, the captain of a Douglas DC-8 conducting Japan Air Lines Flight 2, gained notoriety for his honest assessment of his mistake (the "Asoh defense") in the 1988 book The Abilene Paradox. Asoh was the pilot in command during the 1968 accidental ditching in San Francisco Bay a few miles short of the runway. With the plane resting on the shallow bottom of the bay, he was the last one of the 107 occupants to exit the airplane; all survived with no injuries.
On June 2, 1983, Air Canada Flight 797, a Douglas DC-9, was enroute from Dallas-Fort Worth to Toronto when a fire began in the washroom, filling the cabin with smoke, forcing the pilots to divert to Cincinnati/Northern Kentucky International Airport. Captain Donald Cameron was the last to leave the plane before a flash fire engulfed the cabin 90 seconds after the plane came to a stop, killing 23 out of the 46 passengers and crew that had yet to exit the plane.
During the 2024 Haneda Airport runway collision, the captain was the last to leave the on-fire Japan Airlines Airbus A350 on runway 34R at Haneda Airport. All 367 passengers and 12 crew members on board Flight 516 survived, with 15 people on board surviving with minor injuries.