In 1940, Germany, Italy and Japan formed a military alliance in Berlin known as the Axis. In time, other states that were allies of the three countries joined the Axis alliance, including the Kingdom of Yugoslavia, which acceded to the pact on March 25, 1941. As Britain was bothered by Germany's strengthening in southeastern Europe, it helped the group. military officers to carry out a coup and put King Peter on the throne. Such a development caused Germany to invade and conquer Yugoslavia. On the territory of present-day Croatia and Bosnia and Herzegovina, the Independent State of Croatia (NDH) was established on April 10, 1941, but without Međimurje and Baranja annexed by Hungary and without a significant part of the Croatian coast and islands handed over to Italy. Vladko Maček was offered the leadership of the Independent State of Croatia, but he refused, so Ante Pavelić, the leader of the Ustasha movement, came to power.
The independent state of Croatia was dependent on Germany and Italy. Soon, under the influence of these two countries, racial laws were introduced in the NDH. The result was the mass murder and deportation of Jews, Roma, Serbs and opponents of the Ustasha regime - partisans and communists to concentration camps. The largest camp on the territory of the Independent State of Croatia was Jasenovac. The Ustasha regime had its opponents from the very beginning. The resistance movement was led by partisans who sabotaged communications throughout Yugoslavia with their sabotage actions. On June 22, 1941, the Sisak Partisan Detachment was founded, and the Day of Anti-Fascist Struggle is still celebrated on that date. The partisan movement became stronger, and after the capitulation of Italy on September 8, 1943, more and more Croats joined the movement and the territories occupied by the Italians were gradually liberated. At the Allied Conference in Tehran at the end of 1943, it was decided to give military aid to the partisans in the occupied Yugoslavia. Other parts of Yugoslavia (Serbia, Slovenia) were liberated, and on May 8, 1945, partisans entered Zagreb. Thus, the NDH ceased to exist.
At the end of the war, a group of Ustasha soldiers and civilians headed for the Austrian-Slovenian border to surrender to the British. However, the British handed them over to the partisans near the Austrian town of Bleiburg. Many of the prisoners were killed there, and the rest were returned to Yugoslavia. The so-called "Way of the Cross" began through Slovenia and Croatia - the prisoners walked to the camp, and on that way many of them died of disease, exhaustion, hunger and thirst.