From the late 19th century until World War I, the country was annexed into the Austro-Hungarian monarchy. In the interwar period, Bosnia and Herzegovina was part of the kingdom of Yugoslavia.  After World War II, it was granted full republic status in the newly formed Socialist Federal Republic of Yugoslavia. In 1992, following the breakup of Yugoslavia, the republic proclaimed independence. This was followed by the Bosnian War, which lasted until late 1995 and was brought to a close with the signing of the Dayton Agreement.