The cause of Polish nationalism was repeatedly frustrated before 1918. In the 1790s, Germany, Russia and Austria partitioned Poland. Napoleon set up the Duchy of Warsaw, a new Polish state that ignited a spirit of nationalism. Russia took it over in 1815 as Congress Poland with the tsar as King of Poland. Large-scale nationalist revolts erupted in 1830 and 1863–64 but were harshly crushed by Russia, which tried to Russify the Polish language, culture and religion. The collapse of the Russian Empire in the First World War enabled the major powers to reestablish an independent Poland, which survived until 1939. Meanwhile, Poles in areas controlled by Germany moved into heavy industry but their religion came under attack by Bismarck in the Kulturkampf of the 1870s. The Poles joined German Catholics in a well-organized new Centre Party, and defeated Bismarck politically. He responded by stopping the harassment and cooperating with the Centre Party.