At the beginning of the 40's, Yugoslavia found itself surrounded by hostile countries. Except for Greece, all other neighboring countries had signed agreements with either Germany or Italy. Hitler was strongly pressuring Yugoslavia to join the Axis powers. The government was even prepared to reach a compromise with him, but the spirit in the country was completely different. Public demonstrations against Nazism prompted a brutal reaction. Luftwaffe bombed Belgrade and other major cities and in April 1941, the Axis powers occupied Yugoslavia and disintegrated it. The western parts of the country together with Bosnia and Herzegovina were turned into a Nazi puppet state called the Independent State of Croatia (NDH) and ruled by the Ustashe. Serbia was occupied by German troops, but the northern territories were annexed by Hungary, and eastern and southern territories to Bulgaria. Kosovo and Metohija were mostly annexed by Albania which was under the sponsorship of fascist Italy. Montenegro also lost territories to Albania and was then occupied by Italian troops. Slovenia was divided between Germany and Italy that also seized the islands in the Adriatic.
Following the Nazi example, the Independent State of Croatia established extermination camps and perpetrated an atrocious genocide killing over 750.000 Serbs, Jews and Gypsies. This holocaust set the historical and political backdrop for the civil war that broke out fifty years later in Croatia and Bosnia and Herzegovina and that accompanied the break-up of Yugoslavia in 1991-1992.
The ruthless attitude of the German occupation forces and the genocidal policy of the Croatian Ustasha regime generated a strong Serbian Resistance. The Serbs stood up against the Croatian genocidal government and the Nazi disintegration of Yugoslavia. Many joined the Partisan forces (National Liberation Army headed by Josib Broz Tito) in the liberation war and thus helped the Allied victory. By the end of 1944, with the help of the Red Army the Partisans liberated Serbia and by May 1945 the remaining Yugoslav territories, meeting up with the Allied forces in Hungary, Austria and Italy. Serbia and Yugoslavia were among the countries that had the greatest losses in the war: 1.700.000 (10.8% of the population) people were killed and national damages were estimated at 9.1 billion dollars according to the prices of that period.