 Following World War I and the Treaty of Trianon, Hungary lost Rijeka and Međimurje, as well as other territories, to the newly established Kingdom of Serbs, Croats and Slovenes.The 1921 constitution defined the country as a unitary state and abolished the historical administrative divisions, effectively ending Croatia's autonomy.Međimurje was assigned to Croatia in 1947—when all the borders of the former Yugoslav constituent republics were defined by demarcation commissions, pursuant to decisions of the AVNOJ of 1943 and 1945.