A cousin of the last independent king of Poland, he worked unfailingly at the restoration of his country when Russia, Prussia, and Austria had partitioned it between them. He became the trusted adviser of the Russian Prince Alexander, who became emperor in 1801. The latter appointed him Russian Foreign Minister (1804–05). After the Battle of Leipzig (1813) he sought the re-creation of Poland from the Grand Duchy of Warsaw, formed by Napoleon. In this he was partially successful as the Polish representative at the Congress of Vienna, which restored the kingdom of Poland, but with the Russian emperor as king. He was proclaimed President of the Provisional Government of Poland at the time of the Polish revolt of 1830–31, for which he was condemned to death but then escaped to Paris. He became known as the “Polish king in exile” and helped to plan the two unsuccessful Polish rebellions of 1846–49 and 1863.