The Kingdom of Serbs, Croats and Slovenes was created by the unification of the Kingdom of Serbia (Montenegro had united with Serbia five days previously, while the regions of Kosovo and Metohija, Baranya, Syrmia, Banat, Bačka and Vardar Macedonia were parts of Serbia prior to the unification) and the provisional State of Slovenes, Croats and Serbs (itself formed from territories of the former Austria-Hungary) on 1 December 1918.
Josip Broz Tito was quickly recognized by the Allies at the Tehran Conference, and the royalist government-in-exile in London was pressured into agreeing on a merge with the NKOJ.
For a period, Yugoslavia had two recognized prime ministers and governments (which both agreed to formally merge as soon as possible): Josip Broz Tito leading the NKOJ in occupied Yugoslavia, and Ivan Šubašić leading the King's government-in-exile in London.
After the liberation of Yugoslavia's capital Belgrade in October 1944, the joint government was officially formed on 2 November 1944, with Josip Broz Tito as the prime minister.
Three were from Croatia itself (Josip Broz Tito, Mika Špiljak, and Milka Planinc), while two were Bosnian Croats (Branko Mikulić and Ante Marković).