Situated in the heart of Europe with few natural boundaries, Poland has had a long and troubled history marked by the ambitions of its great power neighbors. A Slavic tribe, the Polanie, became established in the tenth century in the area that became Poland. In the fourteenth century, the Polish kingdom was reestablished and united with Lithuania. Poland fought long wars over the centuries against powerful neighbors. Poles lost their country in 1795 with the partition of Poland by Prussia, Austria, and Russia. Poland achieved independence after World War I. In 1939, Nazi Germany invaded Poland from the west, and from the east, the Soviet Union invaded and occupied eastern Poland, as agreed to secretly with Germany. Poland lost about six million people during the course of World War II. After the war, the Polish communists seized power in 1947 and exercised monopoly rule, with allegiance to the Soviet Union, for 40 years. In 1980, an independent trade union, Solidarity, was formed in the northern port city of Gdansk, and was the first independent workers' organization established in the eastern bloc. Led by shipyard worker, Lech Walesa, Solidarity swiftly broadened its membership to include millions. In an attempt to forestall a possible Soviet invasion, Communist leader General Wojtech Jaruzelski imposed martial law in December 1981 for one year, and Solidarity was banned.
Changes in the Soviet Union under the leadership of Mikhail Gorbachev in the 1980s radically altered the international climate in eastern Europe. Poland established the first non-Communist-led government in the Warsaw Pact on the basis of a historic round table agreement made in April 1989 that split power between the Communist government and the opposition. Elections in June 1989 brought a resounding victory for Solidarity, which won almost all of the freely contested parliamentary seats, and a sound defeat for the Communists. Solidarity leader Lech Walesa nominated Tadeusz Mazowiecki to be prime minister. Poland swiftly launched a radical "shock therapy" economic reform program designed by then-finance minister Leszek Balcerowicz. Lech Walesa won the presidential elections in December 1990.
In Poland's first free parliamentary elections in October 1991, the Democratic Union (a post-Solidarity party) "won" the extremely fragmented vote with about 13% of the vote. In total 29 parties entered the 460-seat Sejm, the lower but more powerful house of Parliament, ushering in an extended period of party and parliamentary impasse, political scandal, and an increasingly divisive political environment. Continued impasse on many issues led President Walesa to dissolve Parliament on 29 May 1993, and call for early elections. Elections held on 19 September 1993, brought former Communists and Communist-allied parties into power. With 52.1% voter turnout, the Democratic Left Alliance (SLD), a coalition of leftist parties, won 20.4% of the vote; the Polish Peasant Party (PSL), another post-Communist party, won 15.4%; and the Democratic Union won 10.6%. The SLD and PSL signed a coalition agreement on 13 October 1993; combined they held majorities in both the Sejm and Senate. A government under Waldemar Pawlak of the Peasant Party was sworn in on 16 October 1993.
The Pawlak government found itself increasingly at odds with President Walesa over many issues. In January 1995, Walesa utilized brinkmanship tactics to remove Pawlak by refusing to sign the budget and threatening to invoke a constitutional clause and dissolve Parliament, a move that would have led to early elections. The strategy ultimately succeeded. The ruling coalition agreed to replace Pawlak with Sejm Speaker Jozef Oleksy of the SLD.
Presidential elections were held in November 1995. After two rounds, incumbent president and former Solidarity leader Lech Walesa was defeated by SLD leader Aleksander Kwasniewski. Shortly after the presidential vote, Prime Minister Oleksy was forced to resign amidst charges of espionage activities with the former Soviet secret service. Oleksy denied the charges, but resigned after the Polish military prosecutor opened a formal investigation in December 1995.
A controversial post-Communist constitution was adopted in 1997. It was supported by the ex-Communists, but opposed by Solidarity and its political partners on the right. Poland was the last eastern European country to adopt a new constitution after the 1989 collapse of Communist rule, and the constitution was seen as a means of securing Poland's democratic transformation.