The League of Communists of Yugoslavia, known until 1952 as the Communist Party of Yugoslavia, was the founding and ruling party of SFR Yugoslavia. It was formed in 1919 as the main communist opposition party in the Kingdom of Serbs, Croats and Slovenes and after its initial successes in the elections, it was proscribed by the royal government and was at times harshly and violently suppressed. It remained an illegal underground group until World War II when, after the Invasion of Yugoslavia in 1941, the military arm of the party, the Yugoslav Partisans, became embroiled in a bloody civil war and defeated the Axis powers and their local auxiliaries. After the liberation from foreign occupation in 1945, the party consolidated its power and established a one-party state, which existed until the 1990 breakup of Yugoslavia.