On the 25th of August 1896, Sultan Hamad died and the acting British Counsul, Sir Basil Cave, appointed Hamad's cousin Hamoud, successor. Another cousin, Khaled, as the son of Barghash, thought he had rightful claim to the Accession. Khaled beat the British Consul to the royal palace Beit el Sahel, entered through a broken window, and along with 2000 supporters, raised the Zanzibar flag and proclaimed himself Sultan.
A potentially explosive standoff ensued when the British authorities refused to recognize Khaled's claim. Soilders from three British ships in the harbour evacuated Europeans to the British consulate, where they gathered on the roof to watch the scene unfold.
The next morning, with the presence of two more ships in Zanzibar harbour, Rear Admiral Rawson trained his guns on the palace and issued an ultimatum. Khaled was either to surrender by 9:am or the fleet would open fire. At 8:am, Khaled asked for talks and his request was turned down. At 9:02, the fleet opened fire with a barrage of shells on the palace. When the dust settled, up to 500 bodies were found in the smoldering ruins. Khaled was not one of them. He had escaped to the German consulate, and from there to Mombasa where he lived out his life. The battle had ended at 9:40 a.m., when the flag was lowered. It was a war that lasted 38 minutes.
The battle is listed in the Guinness Book of Records as the shortest war in history.