The historically communist Polish United Workers' Party dissolved itself in 1990 and transformed into the Social Democracy of the Republic of Poland. The German–Polish Border Treaty, signed in November 1990, resolved the sensitive for Prime Minister Mazowiecki and his government issue of recognition of Poland's western border by Germany, after the country's unification. The Warsaw Pact was formally dissolved on 1 July 1991; the Soviet Union ceased to exist in December 1991 and the last post-Soviet troops left Poland in September 1993. On 27 October 1991, the first (since the 1920s) entirely free Polish parliamentary election took place. This completed Poland's transition from a communist party rule to a Western-style liberal democratic political system.