Dan Lewis runs the popular daily newsletter Now I Know ("Learn Something New Every Day, By Email"). We've invited him to share some of his stories on mental_floss this week. To subscribe to his daily email, click here.

Off the coast of mainland Tanzania is Zanzibar, now a semi-autonomous archipelago but part of Tanzania proper. In 1890, Zanzibar was a British protectorate, but in 1964, after an uprising, it joined with Tanzania (then “Tanganyika”) to form the modern-day country of the same name.

The uprising which led to Zanzibar’s independence from Britain was not the archipelago’s first. On August 27, 1896, the British Empire and Zanzibar went to war—for forty minutes. Before an hour had elapsed, the Anglo-Zanzibar war was over.

Two days prior, Zanzibar’s Sultan, Hamad bin Thuwaini, died suddenly. His would-be successor, his cousin Khalid bin Bargash (whom many believed poisoned Hamad), was disfavored by the British—the Empire wished for Hamoud bin Muhammad to take Hamadi’s place. And, under a treaty signed a decade earlier, the British Empire had to approve of the successor in order for him to successfully accede to the throne. Khalid refused to seek this approval. This British termed this an act of war, and gave Khalid until 9 a.m. local time on the 27th to cede the throne. Khalid responded by barricading himself in the palace, defended by the palace guards.

As 9 a.m. approached, so did the British forces. With more than 1,000 land troops amassed and five ships—two gunboats and three cruisers—the British forces were formidable. The Sultan countered with 2,800 men of his own, albeit not as well armed or trained; a royal yacht and two other boats (akin to large motorboats); and a quartet of artillery batteries. Thirty minutes before the ultimatum struck, the Sultan sent a message to the British diplomatic point of contact, Basil Cave, stating that he had no intention of ceding his throne and did not believe the British would open fire. Cave responded by reiterating the ultimatum: step down by 9 a.m. or prepare for a rain of artillery.

And at exactly 9 a.m., the gunships received their orders: fire. Within minutes, the royal palace received the promised ammunition. The Zanzibari royal yacht, the HMS Glasgow, did its best to stave off the attacks by firing its weapons at one of the warships—but by 9:15, the British navy sunk the Glasgow and the two other Zanzibari boats. The attacks on the palace killed or wounded more than 500 Zanzibaris in about a half hour, and Sultan Khalid bin Bargash fled for the German consulate, where he successfully sought asylum.

At 9:40, hostilities ceased and the Sultan’s flag atop the palace came down. By most accounts, this 40-minute war is the shortest in human history.

In the end, Britian placed Hamoud bin Muhammad in the throne, a position he would serve in until his death in 1902. During his British-backed reign, Sultan Hamoud, to his credit, ended slavery on the island.

To subscribe to Dan's daily email Now I Know, click here. You can also follow him on Twitter.