World War II erupted in September 1939; Yugoslavia was invaded by the Axis powers a year-and-a-half later, and the Independent State of Croatia (; NDH) was established on 10 April 1941. A fascist puppet state, the NDH incorporated all of Bosnia and Herzegovina, almost all of Croatia and parts of Serbia. Maglajlić immediately began organizing resistance to the NDH authorities. In May 1941, she officially entered the outlawed Communist Party of Yugoslavia, despite her father's misgivings about the organization's attitude towards religion. Nevertheless, the NDH's atrocities against Bosniaks prompted him to support the resistance movement. Suspecting his loyalty to the new regime, the Ustaše forced Maglajlić's father to retire from his position as Sharia judge.