The Anglo-Zanzibar War was a military conflict fought between the United Kingdom and the Zanzibar Sultanate on 27 August 1896. The conflict lasted between 38 and 45 minutes, marking it as the shortest recorded war in history.
The immediate cause of the war was the death of the pro-British Sultan Hamad bin Thuwaini on 25 August 1896 and the subsequent succession of Sultan Khalid bin Barghash. The British authorities preferred Hamud bin Muhammed, who was more favorable to British interests, as sultan. In accordance with a treaty signed in 1886, a condition for accession to the sultanate was that the candidate obtain the permission of the British consul, and Khalid had not fulfilled this requirement.
The British considered this a casus belli and sent an ultimatum to Khalid demanding that he order his forces to stand down and leave the palace. In response, Khalid called up his palace guard and barricaded himself inside the palace.