On August 27, 1896, the United Kingdom declared war on the Sultanate of Zanzibar. After a few rounds of bombardment, the Zanzibar forces were defeated, the British were victorious and the conflict had ended. The entire ordeal lasted only around 40 minutes, officially making it the shortest war in history.
The event was triggered by the death of the Sultan of Zanzibar, Hamad bin Thuwaini, two days earlier. In accordance with a treaty between the two nations, the United Kingdom had to approve the ascension of a new ruler. A cousin of the deceased sultan, Khalid bin Barghash, decided this was the opportune moment to seize power and declared himself sultan. However, since the British had someone else in mind for sultan (someone with a more pro-British agenda), they brought up the treaty condition that gave them veto power against any new ascension to the throne. As a result of this, they quickly issued an ultimatum and asked the sultan and his forces to stand down and leave the palace.
Sultan Khalid did the exact opposite. He barricaded himself inside the palace, surrounded by 2,800 armed forces, mostly royal guards and militia. After the expiration of the ultimatum, the British forces led by Brigadier-General Lloyd Matthews made their way to the palace. At 9:02, the British began bombarding the palace. At 9:40, they stopped. The palace was in ruins and the Zanzibar army had been defeated.
Simultaneously, another encounter was taking place on water with a Zanzibar royal yacht and two boats sunk by British cruisers. The sultan’s forces sustained heavy casualties with roughly 500 fatalities while the British only had one injury.
Sultan Khalid managed to escape the palace and sought refuge at the German consulate. He was granted political asylum and spent the next two decades in German East Africa. He was eventually captured by British forces in 1916 and exiled to the Seychelles. As far as the sultanate was concerned, the throne was eventually occupied by Sultan Hamud bin Muhammed and his reign triggered a period of heavy British influence upon Zanzibar.