In the 1970s Poland's government raised food prices while wages stagnated. This and other stresses led to protests in 1976 and a subsequent government crackdown on dissent. The KOR, the ROPCIO and other groups began to form underground networks to monitor and oppose the government's behavior. Labour unions formed an important part of this network. In 1979, the Polish economy shrank for the first time since World War II, by 2 percent. Foreign debt reached around $18 billion by 1980.
Anna Walentynowicz was fired from the Gdańsk Shipyard on 7 August 1980, five months before she was due to retire, for participation in the illegal trade union. This management decision enraged the workers of the shipyard, who staged a strike action on 14 August defending Anna Walentynowicz and demanding her return. She and Alina Pienkowska transformed a strike over bread and butter issues into a solidarity strike in sympathy with strikes on other establishments.
Solidarity emerged on 31 August 1980 at the Gdańsk Shipyard when the communist government of Poland signed the agreement allowing for its existence. On 17 September 1980, over twenty Inter-factory Founding Committees of free trade unions merged at the congress into one national organization NSZZ Solidarity. It officially registered on 10 November 1980.
Lech Wałęsa and others formed a broad anti-Soviet social movement ranging from people associated with the Catholic Church to members of the anti-Soviet left. Solidarity advocated non-violence in its members' activities. In September 1981 Solidarity's first national congress elected Wałęsa as a president and adopted a republican program, the "Self-governing Republic". The government attempted to destroy the union with the martial law of 1981 and several years of repression, but in the end it had to start negotiating with the union.
Roundtable Talks between the government and Solidarity-led opposition led to semi-free elections in 1989. By the end of August a Solidarity-led coalition government was formed, and in December Tadeusz Mazowiecki was elected Prime Minister. Since 1989 Solidarity has become a more traditional trade union, and had relatively little impact on the political scene of Poland in the early 1990s. A political arm founded in 1996 as Solidarity Electoral Action (AWS) won the parliamentary election in 1997, but lost the following 2001 election. Currently, as a political party Solidarity has little influence on modern Polish politics.