The shortest conflict in history lasted less than 40 minutes (38 to be exact) and took place in 1896 in the Indian Ocean, in the waters off the island of Zanzibar, between the British Empire and a local sultan.
The clash was part of the rivalry between the two colonial empires, British and German, for control of East Africa. And it was exacerbated by the opposition of the Zanzibar nobility to the abolition of the slave trade, supported by the British.
The spark was ignited by the death of the pro-British Sultan Ḥamad bin Thuwayni on 25 August 1896, the pro-German Khalid bin Barghash became Sultan of Zanzibar (English protectorate since 1890).
After a series of ultimatums, on August 27, 1896, the Royal Navy deployed 5 ships and began bombarding the island, sinking the Sultan's only ship.
Then the Royal Marines occupied the Royal Palace and the Sultan surrendered, taking refuge in what is now Tanzania, then a German colony.