The resulting 38-minute war, the shortest in history, ended with victory for Britain and the installation of their chosen Sultan, Hamoud bin Mohammed.
Cave was rewarded with appointment as a Companion of the Order of the Bath in 1897 and accompanied Zanzibari Prince Ali bin Hamud to the coronation of King Edward VII in 1902.
The Consul-General, AH Hardinge, was away in Britain at the time and it fell to Cave, as the most senior British diplomat present, to issue a warning to Khalid.
[8][9] Cave continued to send messages to Khalid informing him that the British government considered this an act of rebellion and requesting that he stand down his troops and renounce the office of the sultan.
[11] During this time of unrest Mrs Cave lent her sitting rooms at the consulate as a refuge for the European ladies of the town and instructed her cook to provide for them.
The British government's approval came the next day and Cave received reinforcements in the form of a small flotilla of Royal Navy vessels led by Rear-Admiral Harry Rawson.
[13] Cave entered further negotiations with Khalid but these proved unsuccessful and he was forced to issue an ultimatum to leave by 9 am the next morning or he would open fire.
[10][15] The war, the shortest in history, ended 38 minutes later after 500 defenders had been killed or wounded and the palace set alight, without British loss.
[21] One of Cave's duties was to accompany Prince Ali bin Hamud to Britain as a representative of Hamoud at the coronation of King Edward VII in 1902.
[27] The Germans responded, sending a vessel to the Stone Town harbour which overawed the mutineers and allowed their officers to restore order.