In 1795 the third and the last of the three 18th-century partitions of Poland ended the existence of the Polish–Lithuanian Commonwealth. Nevertheless, events both within and outside the Polish lands kept hopes for restoration of Polish independence alive throughout the 19th century. Poland's geopolitical location on the Northern European Lowlands became especially important in a period when its expansionist neighbors, the Kingdom of Prussia and Imperial Russia, involved themselves intensely in European rivalries and alliances as modern nation-states took form over the entire continent.
At the turn of the 19th century, Europe had begun to feel the impact of momentous political and intellectual movements that, among their other effects, would keep the "Polish Question" on the agenda of international issues needing resolution. Most immediately, Napoleon Bonaparte had established a new empire in France in 1804 following that country's revolution. Other powers' refusal of the new status of France kept Europe at war for the next decade and brought him into conflict with the same east European powers that had beleaguered Poland in the last decades of the previous century. An alliance of convenience was the natural result of this situation. Volunteer Polish legions attached themselves to Bonaparte's armies, hoping that in return the emperor would allow an independent Poland to reappear out of his conquests.
Although Napoleon promised more than he ever intended to deliver to the Polish cause, in 1807 he created a Duchy of Warsaw from Prussian territory that had been part of old Poland and was still inhabited by Poles. Basically a French puppet, the duchy did enjoy some degree of self-government, and many Poles believed that further Napoleonic victories would bring restoration of the entire commonwealth.