Situated in the center of Europe, Poland is an ancient nation that was conceived near the middle of the 10th century. The Polish state reached its zenith under the Jagiellonian dynasty in the 16th century. The monarchy survived many upheavals but eventually went into decline, which ended with the partition of Poland by Prussia, Russia, and Austria in 1795. Poland regained its independence in 1918 following World War I, but was overrun by Germany and the Soviet Union in World War II. With the end of the war, Poland came under communist control and Soviet domination. Labor turmoil in 1980 led to the formation of the independent trade union Solidarity, which over time became a political force. Elections in 1989 ushered in Eastern Europe's first post-communist government, and Lech Walesa, founder of the trade union Solidarity, became the first popularly-elected President of Poland in 1990. With progress in transformation to a democratic and market-oriented country, Poland joined NATO in 1999 and the European Union in 2004.