The apex of chivalry — at least, in some sort of romanticized sense — occurs on a boat destined for the bottom of the ocean. “Women and children first” is the war cry — the idea being that lifeboats should go to them first, and that men, like the captain, should go down with the ship if need be. The ritual is so ingrained in our culture that we almost expect it as a plot element in any story, fiction or non-fiction, involving such a disaster. But where did it come from?

In 1852, a British frigate, the HMS Birkenhead, was charged with transporting troops from England and Ireland to South Africa as part of a decades-long campaign called the Xhosa Wars. Also on board were the wives and families of many of the officers on board, allowing them to stay with their husbands while they were stationed overseas. But the Birkenhead would never arrive at its intended destination. While making its way around Western Cape, the South African province which calls Cape Town its capital (here’s a map), the Birkenhead hit a submerged, uncharted rock and began to take on water. The captain ordered the soldiers on board to help pump the ship dry, but it soon became clear that the Birkenhead was doomed to plummet to the ocean’s bottom. The captain changed his order. Everyone who was able to swim was to jump overboard and swim to lifeboats now in the water. Everyone — man, woman, and child alike. Even the nine cavalry horses being transported were blindfolded and cajoled overboard, in hopes that they could make the two mile swim to shore.

But for the soldiers, the captain’s order was subordinate to their commanding officer, Lieutenant-Colonel Alexander Seton. Seton, likely fearing that a mad rush to safety would cause further harm (and put lifeboats at risk), ordered his men to stand pat, allowing the women and children to take to the lifeboats. Almost all the soldiers followed the order and stood on the boat as it broke up into the cold ocean water rapidly surrounding its shattering hull. Amazingly, some of the soldiers managed to swim to shore. Of the 640 or so people aboard the Birkenhead (we don’t have an exact number because the records sank with the ship), just under 200 survived. And so did eight of the nine horses.

The idea that women and children should be allowed to evacuate first became a maritime practice soon after, but the phrase “women and children first!” did not enter the naval parlance for almost a decade later. By the time the Titanic sank in 1912, the custom was well established. Nearly 75% of the women and more than 50% of the children aboard the doomed ship survived, compared to only 20% of the men.

Bonus fact : The Xhosa Wars are named after the Xhosa, indigenous people in South Africa who resisted British imperialism. In 1856, a teenage Xhosa girl by the name of Nongqawuse went to the cattle fields to scare away birds. While there, she’d report back, she allegedly was visited by three spirits. The spirits told her that to triumph over the British settlers, the Xhosa needed to kill all their cattle and raze all their crops. The prophecy made its way to the chief of Nongqawuse’s clan, who believed that the visions were real and ordered the slaying of an estimated 300,000 cattle. The cattle slaying resulted in a massive famine among the Xhosa, resulting in the death of roughly 40,000 of their people.

From the Archives: Richard Parker: A strange series of shipwreck coincidences.

Related: A 14′ inflatable iceberg. List price of $7,699.99, yours for only $2,999.99. It’s a bargain! (Right?)