The death of Hamad bin Thuwaini on 25 August 1896 saw the Khalid bin Bargash, eldest son of the second sultan, Barghash ibn Sa'id, take over the palace and declare himself the new ruler. This was contrary to the wishes of the British government, which favoured Hamoud bin Mohammed. This led to a showdown, later called the Anglo-Zanzibar War, on the morning of 27 August, when ships of the Royal Navy destroyed the Beit al Hukum Palace, having given Khalid a one-hour ultimatum to leave. He refused, and at 9 am the ships opened fire. Khalid's troops returned fire and he fled to the German consulate. A cease fire was declared 45 minutes after the action had begun, giving the bombardment the title of The Shortest War in History. Hamoud was declared the new ruler and peace was restored once more. Acquiescing to British demands, he brought an end in 1897 to Zanzibar's role as a centre for the centuries-old eastern slave trade by banning slavery and freeing the slaves, compensating their owners. Hamoud's son and heir apparent, Ali, was educated in Britain.