The Romanian capital, Bucharest is witnessing one of the largest ever anti-government protests after a decree was passed that could free dozens of political leaders and magistrates jailed for corruption.

A crowd of at least 150,000 was reported outside government offices late on Wednesday and rallies took place in other towns and cities, according to the BBC.

The decree was passed late on Tuesday by the government, led by Prime Minister Sorin Grindeanu of the Social Democratic Party (PSD). The government says the decree is needed to ease overcrowding in prisons but Grindeanu’s critics say he is trying to release allies convicted of corruption.

The decree would apply to ongoing investigations and trials as well as new cases. Criminal negligence would no longer be an offence, and the definition of conflict of interest would be narrowed.

The government on Tuesday also approved a draft bill that would grant prison pardons. It says it would bring the criminal code in line with recent constitutional court rulings and ease prison overcrowding, claims disputed by many senior judicial figures.

The emergency decree decriminalizes several offences and makes abuse of power punishable by a jail term only if the sums involved are more than $48,000.

One immediate beneficiary would be the PSD leader, Liviu Dragnea, who faces charges of defrauding the state of about $26,000.

Others due for release include elected officials and magistrates. Anti-corruption prosecutors are currently investigating over 2,000 abuse-of-power cases.

The unfolding crisis prompted a cabinet minister to resign on Thursday.

Wednesday’s protests came hours after the EU warned Romania against “backtracking” in its efforts to beat corruption.

“The fight against corruption needs to be advanced, not undone,” said European Commission head Jean-Claude Juncker.

“We are following the latest developments in Romania with great concern.”

The protests began several days ago, attracting the support of centre-right President Klaus Iohannis. He was part of a judicial watchdog’s decision on Wednesday to challenge the decree in the constitutional court. He praised the conduct of protesters across the country and criticized the authorities’ handling of the groups that, as he put it, tried to “break” the Bucharest demonstration.

The protesters massing in Bucharest on Wednesday night chanted “Resign” and “Thieves, thieves”.

Demonstrators accused local football hooligans loyal to the ruling party of trying to sabotage their protest by targeting police. Witnesses told the BBC that a group of at least 100 “ultras” threw smoke bombs and stones at police, leaving two police officers and two protesters hurt.

Romania‘s top judicial watchdog, the Superior Magistrates’ Council (CSM), earlier in the day filed a constitutional court challenge to the decree unveiled by the Social Democrat government.

The number of protesters rose to a new high in the evening, reaching 130,000 to 150,000 outside the cabinet building in Bucharest. Another 100,000 to 150,000 were estimated by riot police to have joined similar rallies in 55 other towns and cities.

The rally in the capital subsided peacefully by 10pm, but after people left the square, a group of about 300 soccer ultras came in and threw fireworks and stones at riot police. The police dispersed them with tear gas. Two policemen and two protesters were slightly hurt by stones, the emergency service said.

Romania‘s Social Democrats won back power in a December 2016 election, one year after protesters drove them from office in an outpouring of anger over a deadly fire at a nightclub that many blamed on corruption and impunity.