The Anglo-Zanzibar Military conflict between the UK and Zanzibar Sultanate in 1896 lasted only 38 minutes. And it was a conflict in response to the ascension of Sultan Khalid bin Barghash after the death of the pro-British Sultan Hamad.
The shortest war in human history was over when the Sultan took the throne, as seen favorably by the British. And this figure was Hamoud bin Mohammed instead of Sultan Khalid bin Barghash, who did not seek permission from the British consul before ascending to the throne as per the 1890 British Protectorate agreement.
During the brief battle, the British destroyed the palace's artillery, set the palace on fire, and shot the palace flag down. In addition, the Sultan's forces sustained about 500 casualties, while in contrast, the defending troops only injured one British sailor.
Out of fear, Sultan Khalid fled and received asylum in the German consulate, after which he escaped to present-day Tanzania. The British quickly placed Hamoud in power to head the puppet government. And this effectively marked the end of the Zanzibar Sultanate's sovereignty and the start of more British influence.
The British authorities preferred Hamoud bin Mohammed; they saw him as a preferable successor who could coordinate British interests as Sultan.
Sultan Khalid did not obtain permission from the British consul before accession, as was the requirement.
The battle for Zanzibar lasted a brief 38 minutes- the shortest war in history! By contrast, the Reconquista war between the English Christian and Muslims (Moors) lasted 781 years, the longest in history.
About 2,800 Zanzibaris defended the Palace, including civilians, palace guards, and enslaved people and servants.
After 38 minutes of fighting, the Brits shot the palace flag down, ending the war.