When Axis Powers invaded, occupied and partitioned Yugoslavia in 1941, Apatin was included into Bács-Bodrog County within the Horthy's Hungary. The town remained under Axis control until 1944. During the Battle of Batina, the front was stretched all the way to Apatin and Bogojevo, and these places became military bases overnight. Yugoslav Partisans entered Apatin on October 24, 1944, and since then Apatin was part of the Yugoslav Autonomous Province of Vojvodina, which (from 1945) was part of the People's Republic of Serbia within the new Socialist Yugoslavia.