Born in Congress Poland on the outskirts of Lublin, Bierut entered politics in 1912 by joining the Polish Socialist Party. Later he became a member of the Communist Party of Poland and spent some years in the Soviet Union, where he functioned as an agent of the Comintern, educated at the Soviet International Lenin School and similar institutions elsewhere in Europe. He was sentenced to a prison term in 1935 for conducting illegal labor activity in Poland by the anti-communist Sanation government, which likely saved him from Stalin's purges soon to be conducted in the Soviet Union. Having only attended an elementary school for several years before being expelled, he later developed an interest in economics and took some cooperative courses at the Warsaw School of Economics. He joined the cooperative movement in his youth. After his release from prison in 1938, he was employed as an accountant for Społem until the outbreak of the war.