 After Austria-Hungary occupied Bosnia and Herzegovina following the 1878 Treaty of Berlin, the Croatian Military Frontier was abolished and the territory returned to Croatia in 1881, pursuant to provisions of the Croatian-Hungarian settlement.Renewed efforts to reform Austria-Hungary, entailing federalisation with Croatia as a federal unit, were stopped by advent of World War I.On 29 October 1918 the Croatian Parliament ("Sabor") declared independence and decided to join the newly formed State of Slovenes, Croats and Serbs, which in turn entered into union with the Kingdom of Serbia on 4 December 1918 to form the Kingdom of Serbs, Croats, and Slovenes.