During World War II, the Croatian Peasant Party (Hrvatska seljačka stranka, HSS) splintered into several factions pursuing different policies and alliances. Prior to the German invasion of Yugoslavia, it was the most powerful political party among ethnic Croats, controlled the administration and police in Banovina of Croatia, and commanded two paramilitary organisations. After the successful invasion of the Kingdom of Yugoslavia in April 1941, Nazi Germany proposed that HSS leader Vladko Maček could rule Croatia as a puppet state. He declined, but the Ustaše agreed and proclaimed the Independent State of Croatia (Nezavisna država Hrvatska, NDH). Under duress, Maček called on Croats to support the regime. A splinter of the HSS and all HSS-controlled infrastructure went over to the Ustaše.
The Communist Party of Yugoslavia (KPJ) and its nominally independent branch, the Communist Party of Croatia (KPH) established the Yugoslav Partisans as armed resistance against the NDH. Maček believed that the Western Allies would prevail and would not allow a Communist regime to be established in Yugoslavia. Consequently, he preferred to wait until a favourable moment to return to power, while maintaining distance from both the Ustaše and the Communists. Another group of HSS members opposed this strategy and broke with the party to cooperate with the KPH and join the Partisans. The KPH welcomed the HSS faction while working to sever ties between the HSS members within Partisan ranks and Maček.
The faction loyal to Maček plotted to take over the NDH's regular army – the Croatian Home Guard, assuming support from Home Guards officers who supported an alliance with the Western Allies. The plotters expected an Allied landing in Dalmatia, which they intended to use to negotiate as an equal party and prevent the establishment of a Communist regime in Yugoslavia after the war. The scheme failed because the United Kingdom had already decided to support the Partisans. In response, the Maček faction tried to negotiate directly with the KPH, but the talks broke down. Instead, the British helped strike the Vis Agreement between the KPJ and Partisan leader Josip Broz Tito and the Yugoslav government-in-exile led by HSS member and former Ban of Croatia Ivan Šubašić, providing for power-sharing between the KPJ and prewar democratic parties.
At the end of the war, the provisional coalition government came under control of the KPJ and the non-Communist ministers resigned before the 1945 Yugoslavian parliamentary election, which was boycotted by the non-Communist opposition. Maček fled Yugoslavia and continued political work from abroad, while the HSS was suppressed in the country and became inactive by 1948.