Communist Yugoslavias was organized in the wake of World War II under the leadership of Josep Broz Tito. Tito had been a leader of the partisan forces that fought against Nazi occupation, and was a very popular political leader. Tito was also a socialist, and his leadership, which was established by popular election, replaced that of the Kingdom of Yugoslavia, which had existed before the war. He would rule the nation, which became known as the Socialist Federal Republic of Yugoslavia, until his death in 1980. Tito is mostly remembered for his unwillingess to completely acquiesce to the Soviet Union, a stance that brought him into what became known as the "nonaligned movement."
Following the German invasions of Yugoslavia and the USSR, the Yugoslav people mobilized a large a partisan army to repel the occupying forces. The partisan resistance was organized and led by Josip Broz Tito and the Communist Party of Yugoslavia. Following their victory over the German occupiers, the people of Yugoslavia refused to re-establish the rule of monarchy under the exiled King Peter. The Federal People's Republic of Yugoslavia was founded and Tito was elected president of the nation shortly thereafter.