(Bloomberg) -- The European Union will mount a challenge to a controversial new Polish law that helped fuel the biggest anti-government protest since the fall of communism, as polls showed Poland’s opposition gaining momentum. 

The EU’s executive arm will open infringement proceedings against Poland to block a law that allows its ruling party to probe opposition leader Donald Tusk ahead of elections slated for October, Commission Vice President Valdis Dombrovskis told reporters on Wednesday. 

The latest dispute over Poland’s adherence to European rule-of-law standards may play a role in giving momentum to the opposition ahead of the contest, in which the ruling Law & Justice party risks losing its grip on power. The Tusk-led opposition held a rally in Warsaw on Sunday that drew as many as half a million people protesting the erosion of democratic standards. It was the largest of its kind since 1989.

The coalition led by Tusk’s Civic Platform climbed six percentage points to 32% since March, according to a June 5-6 Kantar poll taken after the protest. Support for Law & Justice and its allies on the right remained unchanged at 31%. It was the first time Tusk, a former European Council president, took a lead since February.

The US and EU issued a swift rebuke of the new law after it was approved by President Andrzej Duda on May 29. The legislation entails a special committee to probe alleged Russian meddling in Poland, with unprecedented powers that could potentially prevent officials from pursuing public office. 

By Friday, Duda sought to defuse the controversy by proposing measures that would soften parts of the law. Still, the president’s office called the panel a “matter of Polish domestic politics” that was similar to other investigative bodies established in other European countries. 

“The European Commission has in the past undertaken other procedures against Poland — it was plausible to expect further steps against Poland could be undertaken,” Pawel Szrot, Duda’s chief of staff, said in a statement. 

The commission’s decision shows that the investigative panel “crossed a red line,” Tomasz Siemoniak, the deputy chairman of Tusk’s party, told Bloomberg. 

The turmoil has caught Law & Justice on the back foot as it seeks a third term in power. The party has consolidated public support with popular programs including child benefits, a lower retirement age and boosted pensions. But its latest bid to gird that backing with a fresh increase monthly child subsidies hasn’t prompted a poll surge. 

Tusk’s lead wouldn’t give his alliance a ruling majority — he would still need to cobble together a fractious coalition to form a government. But the turnout Sunday suggested momentum may be shifting to the opposition, which like the EU has accused the ruling party’s of eroding the independence of Poland’s courts and the media, curtailing LGBTQ rights and restricting access to abortions. 

The opposition surge was confirmed in the second poll conducted after the Sunday rally. The Civic Coalition gained 4.7 percentage points to 30.1% in the June 6 survey by IBRiS for Onet.pl. That still placed it behind the Law & Justice, whose support rose to 33.9% from 32% in the previous mid-May poll.

The EU’s latest action comes after Poland lost the final round of a separate legal battle with Brussels when the bloc’s top court ruled that Poland’s controversial regime to discipline national judges violated EU law. That fight had resulted in record daily EU fines of €1 million ($1.1 million).

Poland has so far failed to pay any part of its bill, which currently stands at €556.5 million. That’s led the commission to withhold €360 million from EU funds earmarked for the nation for the period between November 2021 and October 2022. 

The fines stopped accruing after the ruling, but the EU’s top court said Warsaw is still obligated to pay the existing penalties. 

--With assistance from Katharina Rosskopf and Kevin Whitelaw.

(Updates with results of 2nd survey in 11th paragraph)

©2023 Bloomberg L.P.