In 1918, Ilok first became part of the State of Slovenes, Croats and Serbs, and then part of the Kingdom of Serbs, Croats and Slovenes (in 1929 renamed Kingdom of Yugoslavia). From 1929-39, Ilok was part of the Danube Banovina and, from 1939–41, of the Banovina of Croatia within the Kingdom of Yugoslavia. Between 1941-44, during the Axis occupation of Yugoslavia, it belonged to the Independent State of Croatia. From 1945 onward, it was part of the People's Republic of Croatia within Socialist Yugoslavia.