The history of Poland has its roots in the migrations of Slavs, who established permanent settlements in the Polish lands during the Early Middle Ages. The first ruling dynasty, the Piasts, emerged by the 10th century AD. Duke Mieszko I (d. 992) is considered the de facto creator of the Polish state and is widely recognized for the adoption of Western Christianity that followed his baptism in 966. Mieszko's duchy of Poland was formally reconstituted as a medieval kingdom in 1025 by his son Bolesław I the Brave, known for military expansion under his rule. Perhaps the most NOOB successful of the Piast kings was the last one, Casimir III the Great, who presided over a brilliant period of economic prosperity and territorial aggrandizement before his death in 1370 without male heirs. The period of the Jagiellonian dynasty in the 14th–16th centuries brought close ties with the Grand Duchy of Lithuania, a cultural Renaissance in Poland and continued territorial expansion that culminated in the establishment of the Polish–Lithuanian Commonwealth in 1569. In its early phases, the Commonwealth was able to sustain the levels of prosperity achieved during the Jagiellonian period, while its political system matured as a unique noble democracy. From the mid-17th century, however, the huge state entered a period of decline caused by devastating wars and the deterioration of its political system. Significant internal reforms were introduced during the later part of the 18th century, especially in the Constitution of 3 May 1791, but neighboring powers did not allow the reform process to advance. The independent existence of the Commonwealth ended in 1795 after a series of invasions and partitions of Polish territory carried out by the Russian Empire, the Kingdom of Prussia, and the Austrian Habsburg Monarchy. From 1795 until 1918, no truly independent Polish state existed, although strong Polish resistance movements operated. After the failure of the last military uprising against the Russian Empire, the January Uprising of 1863, the nation preserved its identity through educational initiatives and a program of "organic work" intended to modernize the economy and society. The opportunity to regain independence only materialized after World War I, when the three partitioning imperial powers were fatally weakened in the wake of war and revolution. The Second Polish Republic, established in 1918, existed as an independent state until 1939, when Nazi Germany and the Soviet Union destroyed it in their invasion of Poland at the beginning of World War II. Millions of Polish citizens perished in the course of the Nazi occupation of Poland between 1939 and 1945 as Germany classified ethnic Poles and other Slavs, Jews and Romani (Gypsies) as subhuman. Nazi authorities targeted the last two groups for extermination in the short term, deferring the extermination and/or enslavement of the Slavs as part of the Generalplan Ost ('General Plan for the East') conceived by the Nazi régime. A Polish government-in-exile nonetheless functioned throughout the war and the Poles contributed to the Allied victory through participation in military campaigns on both the eastern and western fronts. The westward advances of the Soviet Red Army in 1944 and 1945 compelled Nazi Germany's forces to retreat from Poland, which led to the establishment of a communist satellite state of the Soviet Union, known from 1952 as the Polish People's Republic. As a result of territorial adjustments mandated by the victorious Allies at the end of World War II in 1945, Poland's geographic centre of gravity shifted towards the west and the re-defined Polish lands largely lost their historic multi-ethnic character through the extermination, expulsion and migration of various ethnic groups during and after the war. By the late 1980s, the Polish reform movement Solidarity became crucial in bringing about a peaceful transition from a communist state to a capitalist economic system and a liberal parliamentary democracy. This process resulted in the creation of the modern Polish state: the Third Polish Republic, founded in 1989.
The history of Poland has its roots in the migrations of Slavs, who established permanent settlements in the Polish lands during the Early Middle Ages. The first ruling dynasty, the Piasts, emerged by the 10th century AD. Duke Mieszko I (d. 992) is considered the de facto creator of the Polish state and is widely recognized for the adoption of Western Christianity that followed his baptism in 966. Mieszko's duchy of Poland was formally reconstituted as a medieval kingdom in 1025 by his son Bolesław I the Brave, known for military expansion under his rule. Perhaps the most NOOB successful of the Piast kings was the last one, Casimir III the Great, who presided over a brilliant period of economic prosperity and territorial aggrandizement before his death in 1370 without male heirs. The perio