When World War II started, Zagreb was the capital of the newly formed autonomous Banovina of Croatia within the Kingdom of Yugoslavia, which remained neutral in the first years of the war. After the Invasion of Yugoslavia by Germany and Italy on 6 April 1941, German troops entered Zagreb on 10 April. On the same day, Slavko Kvaternik, a prominent member of the Ustaše movement, proclaimed the creation of the Independent State of Croatia (NDH), an Axis puppet state, with Zagreb as its capital. Ante Pavelić was proclaimed Poglavnik of the NDH and Zagreb became the center of the Main Ustaša Headquarters, the Government of the NDH, and other political and military institutions, as well as the police and intelligence services.

Upon the establishment of the NDH, the Ustaše enacted race laws and started persecuting Serbs, Jews, and Roma. Thousands of locals, primarily Jews, would be killed in prisons and execution sites around the city, mainly in Dotrščina and Rakov Potok forests, or taken to concentration camps and executed there.

Later in 1941, the Communist Party of Yugoslavia started an armed uprising against the NDH, and conducted several operations in the city, but mostly operated underground and in liberated territories elsewhere. The influx of refugees from war-ravaged areas of the NDH nearly doubled the population of Zagreb by the end of the war.

In January 1944, the 10th Zagreb Corps was formed. It mainly operated in the wider Zagreb area and Northwest Croatia. The Allies carried out several aerial attacks on the city in 1944 and 1945. The Government of the NDH abandoned the city on 6 May 1945. Most of its military forces had withdrawn from Zagreb by 8 May, when units of the 1st and 2nd Armies of the Yugoslav Partisans took control of it. The Partisans then killed many captured soldiers and civilians accused of collaboration.

In total, more than 26,000 people from Zagreb lost their lives from 1941 to 1945. In 1975, the President of Yugoslavia, Josip Broz Tito, awarded the city of Zagreb with the Order of the People's Hero.

Banovina of Croatia

In August 1939, a week before the start of World War II, the autonomous Banovina of Croatia within the Kingdom of Yugoslavia was formed, with Zagreb as its capital. The formation of the Banovina of Croatia was negotiated under the Cvetković–Maček Agreement between Vladko Maček, leader of the Croatian Peasant Party (HSS), and Dragiša Cvetković, the Prime Minister of Yugoslavia. Ivan Šubašić, a prominent member of the HSS, was appointed as Ban of Croatia. The agreement was widely supported among Croats, and the Yugoslav government thought that it would strengthen the country.

The HSS expanded its two paramilitary organizations, the Croatian Civic Guards (Hrvatska građanska zaštita) and the Croatian Peasant Guards (Hrvatska seljačka zaštita), which were planned to be the core of the future Croatian army. The Civic Guard in Zagreb had the status of an auxiliary police force. It was established in July 1938 and numbered around 3-4,000 men.

The Cvetković–Maček Agreement, Maček's entry into the Yugoslav government, and the worsening economic situation led to dissatisfaction among some segments of the population. The radical nationalist Ustaše movement considered Maček a traitor who betrayed the idea of an independent Croatia. In July 1938, Mile Budak, the second most influential member of the movement, arrived in Zagreb and started the pro-Ustaše Hrvatski narod (Croatian people) newspaper. The activities of the Ustaše increased in 1940, when the newspaper was banned. Despite the growth in popularity in the late 1930s, their membership remained low.

The Communist Party of Croatia (KPH), established in 1937 as a branch of the Communist Party of Yugoslavia (KPJ), also experienced growth in the late 1930s. However, the HSS kept its dominance, especially among the peasantry. In September 1939, the Zagreb branch of the KPH greeted positively the Cvetković–Maček Agreement. The KPJ later rejected the agreement as an attempt to protect the interests of the Croatian and Serbian bourgeoisie. The conflict within the leadership of the KPH over their stance towards the HSS, the Cvetković–Maček Agreement, and Stalinism, led to the purge of "dissidents" in the KPH, focused around the Croatian writer Miroslav Krleža. The KPH leadership was replaced at the 5th Land Conference, held in Zagreb in August 1940.

In December 1939, a new railway bridge over the Sava River was opened by Šubašić, Maček, and Archbishop Aloysius Stepinac. In late 1939 and in 1940, the HSS Guards units and the police conducted mass arrests of the Ustaše and communists, and arrested the leadership of the newly formed Croatian National Socialist Party. The 1940 local elections, held in May and June 1940, excluded Zagreb and other cities of the Banovina of Croatia.

Occupation and the establishment of NDH

Germany put pressure on Yugoslavia to join the Tripartite Pact, which Prince Paul of Yugoslavia accepted on 25 March. Demonstrations against the decision soon broke out and a coup d'état was launched on 27 March. Hitler took the coup as a personal insult and launched the invasion of Yugoslavia on 6 April 1941. Most Croat soldiers in the Yugoslav Army did not feel Yugoslavia as their country and refused to fight for it. The Germans tried to persuade Maček to proclaim the independence of Croatia under the patronage of Germany, but he refused it, so they decided to support the Ustaše instead. Maček returned to Zagreb from Belgrade when the invasion began to help maintain order. His support was not as high in Zagreb as in the rest of Croatia, and many in the city had already switched allegiance to the Ustaše.

On 8 April, a meeting of the Central Committee of the KPJ was held in Zagreb, chaired by General Secretary Josip Broz Tito. The meeting adopted the conclusion that the Yugoslav army has no chance to resist the Wehrmacht and that the KPJ members should report immediately to the call for mobilization, but no armed resistance was organized in Zagreb. The KPJ sent a delegation to the headquarters of the 4th Army in Zagreb, requesting weapons for workers to help in the fight against the Germans. The Command of the Military District refused their request. German agents stationed in Zagreb, the Ustaše and their sympathizers made preparations for the takeover of power in Zagreb upon the Wehrmacht arrival.

On 10 April, elements of the 14th Panzer Division entered Zagreb without resistance and were greeted by cheering crowds. Slavko Kvaternik declared the establishment of the Independent State of Croatia (, NDH) via the Zagreb Radio Station, with Zagreb as its capital. Most of the population was pleased with the dissolution of Yugoslavia. Kvaternik formed a provisional government in Zagreb on 12 April. Ante Pavelić, who was named the leader (Poglavnik) of NDH, arrived in Zagreb on 15 April. He gave a short speech in which he said: "Ustaše! We have won. We won because we had faith. We won because we held out. We won because we fought. Ustaše! We won because we were always for homeland ready!" Jozo Dumančić was temporarily named the Mayor of Zagreb, replacing Mate Starčević of the HSS. Vladko Maček was forced by the Germans to recognize the NDH. The entire administrative and police apparatus of the Banovina of Croatia was handed over to the new government.

When the NDH was proclaimed, the leadership of the Communist Party was in Zagreb, together with Josip Broz Tito. After a month, they left for Belgrade. Until 22 June, while the Molotov–Ribbentrop Pact between Germany and the Soviet Union was in effect, the Communists refrained from open conflict with the new regime. In the first two months of the NDH they extended their underground network and began amassing weapons. These included Rade Končar, Vladimir Bakarić, Jakov Blažević, Andrija Hebrang, Josip Kraš, Marko Orešković and others.

On 15 April 1941 a leaflet that contained a KPJ manifesto was duplicated and sent to all parts of Yugoslavia. The manifesto emphasized that the "Communists and the entire working class of Yugoslavia would be in the forefront of the national resistance against the invaders" and that "it would persist in the resistance until final victory".

NDH rule in Zagreb

In early May 1941 Dumančić was replaced with Ivan Werner as Mayor of Zagreb, who stayed on that position until his death in June 1944. In December 1941 there were anti-Italian protests in Zagreb against the Italian rule in Dalmatia. Stepinac also criticized the Treaties of Rome. In April 1942 the Rebro Hospital was built.

The new government gave particular importance to the Islamic community, especially the Bosnian Muslims which they viewed as Croat Muslims. The Meštrović Pavilion in the centre of Zagreb was turned into a mosque, with three minarets built around it.

In May 1942, the Ustaše organized the Antisemitic Exhibition in Zagreb, and cinema screenings of German antisemitic propaganda films. The exhibition also featured photographs of the various stages of the demolition of the Zagreb Synagogue, which had been located in the city centre and was destroyed in stages from October 1941 to April 1942.

In June 1942 a new religious organisation was formed in Zagreb, the Croatian Orthodox Church. Germogen was named the Metropolitan of Zagreb and whole Croatia.

The population of Zagreb constantly changed during the war as much of the civilian population from regions of NDH where military operations took place moved to Zagreb. At the end of 1941, Zagreb had 218,200 citizens. In the course of 1942, as thousands of refugees began pouring into the city, the population of Zagreb ranged from 350,000 to 400,000. At the beginning of 1944 the population of the city increased to around 417,000.

Military

After NDH was proclaimed, the main armed forces were stationed in Zagreb, where three units were formed: The Poglavnik Bodyguard Battalion, First Ustaše Regiment and a Company of university students. Later the First Ustaše Regiment was separated into individual battalions. The Croatian Home Guard officers' Academy was founded in Zagreb.

In 1944, the armed forces of NDH were reorganized. Of the 18 standing brigades, the 10th and 25th were in Zagreb, together with the Poglavnik Bodyguard Brigade and the Zagreb Ustaše Brigade. At the end of 1944, the Croatian Armed Forces were formed that unified the Croatian Home Guard and the Ustaše militia. The 1st Croatian Assault Division, 2nd Croatian Infantry Division, 16th Croatian Replacement Division and the Poglavnik Bodyguard Division were headquartered in Zagreb and operated in central and northwestern Croatia. In December 1944, the Partisans estimated the strength of the 3 divisions at 7,000 (1st), 4,500 (2nd) and 9,500 (16th).

War crimes

When Ustaše came to power, they immediately started to spread terror and to persecute their opponents, from May 1941 onwards. During the occupation, Ustaša inflicted abuse and torture of prisoners at several locations around the town, such as a notorious prison on Savska street, the prison on the Square N and a torture chamber in Jandrićeva street 74, popularly known as "Sing-Sing".

Ustaše reign of terror commonly included publicly announced death penalties for anti-fascists, sympathizers, or just civilians in mass retribution for Partisan activities. The woods in Dotrščina, which was at the time located out of Zagreb, and Rakov Potok, a forest south of the Sava river and today's Novi Zagreb, were used as execution sites. It is estimated that throughout the war Ustaše executed about 10,000 people in Dotrščina (2,000 of which were members of the SKJ and SKOJ),Stipe Ugarković- Ivan Očak, Zagreb grad heroj-Spomen obilježja revoluciji, August Cesarec, Zagreb 1979, p. 135-139 and around 400 in Rakov Potok.