Navy, to restore order in Tanganyika. The operation was largely successful, but anti-German feeling among the Zanzibari people remained strong. Further conflicts erupted at Bagamoyo, where 150 natives were killed by German military forces, and at Ketwa, where German officials and their servants were murdered. Khalifah then granted extensive trade rights to the Imperial British East Africa Company (IBEAC) who, with German assistance, ran a naval blockade to halt the continuing domestic slave trade. Upon Khalifah's death in 1890 Ali bin Said ascended to the sultanate. Sultan Ali banned the domestic slave trade (but not slave ownership), declared Zanzibar a British protectorate and appointed Lloyd Mathews as First Minister to lead his cabinet. The British were also guaranteed a veto over the future appointment of sultans. The year of Ali's ascension also saw the signing of the Heligoland–Zanzibar Treaty between Britain and Germany. This treaty officially demarcated the spheres of interest in East Africa and ceded Germany's rights in Zanzibar to the United Kingdom. This granted the British government more influence in Zanzibar, which they intended to use to eradicate slavery there, an objective they had held as early as 1804. Sultan Ali's successor was Hamad bin Thuwaini, who became sultan in 1893. Hamad maintained a close relationship with the British, but there was dissent among his subjects over the increasing British control over the country, the British-led army and the abolition of the valuable slave trade. In order to control this dissent, the British authorities authorised the sultan to raise a Zanzibari palace bodyguard of 1,000 men, but these troops were soon involved in clashes with the British-led police. Complaints about the bodyguards' activities were also received from the European residents in Zanzibar Town. 25 August 1896 Sultan Hamad died suddenly at 11:40 EAT (08:40 UTC) on 25 August 1896. His 29-year-old nephew Khalid bin Bargash, who was suspected by some of his assassination, moved into the palace complex at Zanzibar Town without British approval, in contravention of the treaty agreed with Ali. The British government preferred an alternative candidate, Hamoud bin Muhammed, who was more favourably disposed towards them. Khalid was warned by the consul and diplomatic agent to Zanzibar, Basil Cave, and General Mathews to think carefully about his actions. This course of action had proved successful three years earlier when Khalid had tried to claim the sultanate after the death of Ali, and the British consul-general,