Austria-Hungary took control over Bosnia and Herzegovina in 1878 and ruled the country until the aftermath of World War I in 1918, when it became part of the State of Slovenes, Croats and Serbs and then Yugoslavia.