The first state in Bosnia and Herzegovina was in the Middle Ages. During the Ottoman Empire, it was a very important province in the Balkans and the capital, Sarajevo, had 100,000 people. In 1878, it became a province of Austria-Hungary when the Empire took over Bosnia and Herzegovina in 1908. In 1914 the Archduke Ferdinand and his wife, Sophie, were assassinated in Sarajevo, leading to World War I. From 1918 until 1992, the country was a part of the former Yugoslavia. After a 3-year long war, Bosnia and Herzegovina proclaimed independence as a country consisting mostly of Serbs, Croats and Bosnian Muslims.