Hundreds of thousands of people have marched in an anti-government protest in Poland’s capital to voice their anger at officials who they say have eroded democratic norms and created fears that the nation is following Hungary and Turkey down the path to autocracy.

Warsaw mayor Rafal Trzaskowski, who belongs to the opposition party that led the march, estimated 500,000 people took part. The Onet news portal estimated there there were at least 300,000 at the march’s culmination.

Large crowds also gathered in Krakow and other cities across the nation of 38 million people, showing frustration with a government that critics accuse of violating the constitution and eroding fundamental rights in Poland, a country long hailed as model of peaceful and democratic change.

Former president Lech Walesa, the leader of the Solidarity movement that played a historic role in toppling communism in Poland, marched alongside the leader of the opposition Civic Platform party, former prime minister Donald Tusk.

Poland Democracy March
Lech Walesa and Donald Tusk accuse the government of eroding democracy (Czarek Sokolowski/AP)

The Warsaw crowd cheered the two men, both of whom are reviled by the ruling Law and Justice party led by Jaroslaw Kaczynski, and at times chanted “Democracy!” and “Constitution!”

The crowd marched from the office of Prime Minister Mateusz Morawiecki and past the seat of President Andrzej Duda, ending at the historic Royal Castle, where Mr Tusk hailed the huge turnout and pledged to fight to win an autumn election and undo what he described as profound harm and division.

“We are going to these elections to win and to right human wrongs. I promise you victory, a settlement of evil, compensation for human wrongs and reconciliation among Poles,” he told the crowd.

Government spokesman Piotr Mueller accused Mr Tusk – a former president of the European Council – and Mr Walesa of “trying to overthrow the government”.

Supporters of the march have warned that the autumn election might be the nation’s last chance to stop the erosion of democracy under the ruling party amid growing fears that the vote might not be fair.

In power since 2015, Law and Justice has found a popular formula, combining higher social spending with socially conservative policies and support for the church in the mostly Catholic nation.

Poland Democracy March
President Andrzej Duda signed a controversial law which allows for the creation of a commission to investigate Russian influence in Poland (Michal Dyjuk/AP)

Critics have warned for years that the party is reversing many of the achievements made since Poland emerged from communist rule in 1989.

Critics point mainly to the party’s step-by-step takeover of the judiciary and media. It uses state media for heavy-handed propaganda to tarnish opponents. Law and Justice also tapped into animosity against minorities, particularly LGBT+ people, whose struggle for rights the party depicts as a threat to families and national identity.

A clampdown on abortion rights has triggered mass protests.

Critics fear the party could eventually force the country to leave the European Union.

The march was held on the 34th anniversary of Poland’s first partly free election, a democratic breakthrough in the toppling of communism across eastern Europe. The protest was seen as a test for Mr Tusk’s Civic Platform, a centrist and pro-European party which has trailed behind Law and Justice in polls.

However, the passage of a controversial law last month seems to have mobilised greater support for Mr Tusk. Poland is expected to hold a general election in October, though a date has not yet been set.

The law allows for the creation of a commission to investigate Russian influence in Poland. Critics argue that it would have unconstitutional powers, including the capacity to exclude officials from public life for a decade. They fear it will be used by the ruling party to remove Mr Tusk and other opponents from public life.