Communism in Poland can trace its origins to the late 19th century: the Marxist First Proletariat party was founded in 1882. Rosa Luxemburg (1871–1919) of the SDKPiL party and the publicist Stanisław Brzozowski (1878–1911) were important early Polish Marxists.
During the interwar period in the Second Polish Republic, Polish communists formed the Communist Party of Poland (KPP). Most of the KPP leaders and activists perished during Joseph Stalin's Great Purge in the 1930s and the Party was abolished by the Cominterm in 1938.
In 1942 the Polish Workers' Party (PPR), a new Polish communist party, was established in Nazi-occupied Poland and was soon led by Władysław Gomułka. In Moscow the Union of Polish Patriots was set-up with Stalin's support as a rival communist center. As Nazi Germany was being defeated, the Polish communists cooperated with the Soviet Union, in opposition to the Polish government-in-exile, in order to establish a Soviet-dependent Polish state. This led to the creation of the Polish People's Republic and, after the fusion of the PPR with the Polish Socialist Party (PPS), the Polish United Workers' Party (PZPR). In post-World War II Poland, the Polish communists could count on limited popular support and their staying in power depended on the support of their Soviet allies.