It's generous to call the Anglo-Zanzibar War a "war." The entire conflict lasted less than an hour and the victory was ludicrously one-sided, yet this 1896 standoff between the British Royal Navy and a stubborn sultan is commonly cited as the shortest war on record.
Today, Zanzibar is a semi-autonomous island nation off the coast of Tanzania in the Indian Ocean, but in the 19th century the Sultanate of Zanzibar was a powerful trading empire in East Africa. From the ports of Zanzibar, ships departed with ivory and spices from the African mainland and returned with textiles and guns. But the most lucrative trade in Zanzibar was enslaved Africans.
An estimated 25,000 to 30,000 enslaved people were sold and shipped out of Zanzibar as late as the 1880s, according to The Historian magazine. And the Sultan of Zanzibar, who ruled from the royal palace, grew rich from the slave trade, even as the British tried to end the practice by raiding suspected slave ships in the Indian Ocean.
In 1890, Britain signed a treaty with Germany that carved out separate "zones of influence" for the two imperial nations in Africa and Zanzibar became a British "protectorate" — not quite a colony, but still under the thumb of the British government and military.