A union leader, the pope and Margaret Thatcher may sound like the opening of an old joke. Instead of walking into a bar, the unlikely combo a defeated communist regime in Poland, revived free enterprise and democracy, and ushered in a period of unprecedented freedom and prosperity in the heart of Europe.

Solidarity, the first independent trade union in the Soviet bloc, was born out of a strike at the Lenin Shipyard in Poland’s Gdansk in August 1980. The reasons for unrest seemed pedestrian. At the beginning of the 1970s, the communist leadership promised an economic boom that would allow living standards to catch up with those in the West.

Financed through foreign borrowing, the consumption-led expansion, not matched by any growth in productivity within the vastly inefficient state-run economy, was short-lived. As the government faced the pressure of foreign lenders in the latter half of the decade, fiscal tightening ensued and with it came increases in the prices of food and other commodities.

Those were not well-received by people who had been constantly told that Poland’s social and economic model was superior to Western democratic capitalism. Already in 1970, price increases of consumer staples led to protests in the north of Poland. Those were met with brutal violence, including the use of tanks and machine gun fire to suppress the rioters. At least 40 people were killed and more than 1,000 were wounded.

A reshuffle of the ruling United Workers’ Party’s central committee ensued and the new leadership promised to put the people first — by embarking on an unsustainable, consumption-driven boom.

When Poland’s economy found itself in dire straits again at the end of the 1970s, Poles were slowly waking up to the realization that the communist system was flawed and unsustainable as a whole. The election of a popular Polish cardinal, Karol Wojtyła, as pope in 1978 gave them also the sense that they were no longer part of Europe’s forgotten periphery.

The demands of Gdansk shipyard workers led by Lech Walesa in August 1980 went beyond material prosperity and labor standards. They called for the release of political prisoners, freedom of speech and the press, and the legalization of trade union independent of the ruling party.

To say such things was not just subversive, it was unthinkable under a regime which vehemently denied that it persecuted people based on their beliefs or curbed freedom speech. The totalitarian ideology offered no place for legitimate dissenters. Since the party was the only legitimate voice of the working class, disagreement was a product of false consciousness, bourgeois prejudices or propaganda spreading from the imperialist West.

Other than repression, the regime had no means of engaging with dissent coming from factory floors. Martial law was imposed in 1981. Later, Jerzy Popieluszko, a Catholic priest working closely alongside the union leaders, was assassinated by secret police.

Yet the days of communism in Poland were numbered. There was no way to revive the moribund planned economy or to restore the regime’s legitimacy in the eyes of those it claimed to serve. In 1986, in a bow to economic reality, Poland joined the International Monetary Fund, yet the prescribed economic reforms were incompatible with a centrally planned communist economy.

The party continued to kick the can down the road, but the unrest continued, with mass strikes organized by Solidarity in the spring and summer of 1988. By then, the union had grown into a movement with millions of members.

During her highly symbolic visit to Poland in November 1988, the Britain’s Prime Minister Margaret Thatcher made a point of visiting the Lenin Shipyard, where she was greeted enthusiastically by some 20,000 Poles. After her meeting with Walesa, she said that she had “felt the spirit of Poland for myself.” At a dinner given earlier by the Polish government, she told her hosts that “one of the lessons of the world since 1945 is that greater prosperity comes to those nations which have greater freedom” and reminded them that they will be judged “by how they treat their own citizens.”

The rest, of course, is history. Within a few months, the regime gave in. After the semi-free elections in June 1989 the newly formed Solidarity-led government pursued a program of radical pro-market reforms that turned Poland into one of the most successful countries in Central Europe. But the main lesson of Solidarity is worth remembering in times of an increasingly toxic political culture across the Western world: namely that political renewal in crisis comes from building bridges over steep, decades-old divides.