More than 250,000 Romanians demonstrated on Wednesday against a government decree decriminalising some graft offences, seen as the biggest retreat on reforms since the country joined the European Union in 2007.
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 new Social Democrat government of Prime Minister Sorin Grindeanu.
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 2200 GMT, 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.
The decree that triggered the nationwide protests was approved by the cabinet on Tuesday evening.
"Repeal it, then leave," protesters shouted. "Thieves, thieves." Many waved Romanian national flags.
"Our chances are small but it is important to fight," said Gabriela Constantin, a 36-year-old architect.
If enforced, as planned, within 10 days, the decree would, among other things, decriminalise abuse-of-power offences in which the sums involved are less than 200,000 lei ($48,000).
That would put an end to the current trial of Social Democrat party leader Liviu Dragnea, accused of using his political influence to secure state salaries for two people working at his party headquarters between 2006 and 2013.
Dozens of other political figures from all parties stand to benefit from the decree.
"I don't understand what the protesters are upset about," Dragnea told reporters on Tuesday.
Two opposition parties, the centrist Liberals and the Save Romania Union USR, filed a no-confidence motion on Wednesday against the government which has little chance of succeeding.
As parliament opened for its first regular session of the year, USR lawmakers paraded banners reading "Shame" and other opposition deputies shouted "Resignation" or "Thieves".
The Romanian leu fell as much as 1.4 percent against the euro to 4.5540, marking a seven-month low, while longer-term yields rose 14 basis points.
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.
Anti-corruption prosecutors are currently investigating over 2,000 abuse-of-power cases.
President Klaus Iohannis took part in an emergency meeting of the CSM, telling reporters afterwards:
"The problem is that one cannot act the way the government did in a country with the rule of law, which Romania is and wants to remain."
"The fight against corruption needs to be advanced, not undone," European Commission head Jean-Claude Juncker and his deputy said in a statement. "We are following the latest developments in Romania with great concern."
Six western countries including Germany and the United States issued a joint statement warning that the government's move would undermine Romania's international reputation and position in the EU and NATO.
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.