Poland's ruling party lawmakers gave preliminary approval on Friday to two bills allowing parliament and the president to replace top judges, plans the opposition and the European Commission denounced as a threat to the rule of law.

Once finally approved and signed into law by the president, the bills would likely deepen the right-wing government's standoff with the EU, potentially reducing the flow of EU development funds to Poland.

Law and Justice (PiS) party deputies sent the bills authored by President Andrzej Duda to parliamentary committees after Duda vetoed PiS-sponsored bills in July that would have given the justice minister large powers over judges.

Duda cast his veto after prolonged mass protests across Poland. In November, Duda and PiS reached an agreement on the shape of the judicial reform, according to which parliament will need a three-fifths majority to appoint new members of the National Council of the Judiciary (KRS), a key panel that appoints judges in Poland.

Details of the judicial reform bills are expected to be revealed on Tuesday and PiS has said all work on them could be finished in December. The PiS currently has an absolute parliamentary majority, but not a three-fifths one.

The euroskeptic PiS, under the auspices of party leader Jaroslaw Kaczynski, says reform of the judicial system is needed because the courts are slow, inefficient and steeped in a communist-era mentality. But critics of the government said the bills are part of a PiS plan to increase its powers over the judiciary and reflect its drive towards authoritarianism, both charges PiS denies.

"Will this demolition speed up court cases? No," lawmaker Krzysztof Paszyk of the opposition PSL told parliament on Friday, adding the bills would introduces "pathology" into the justice system.

'A thuggish project'

The European Commission's deputy head, Frans Timmermans, said earlier in November that Duda's bills — which row back from direct government interference in the judiciary envisaged in the original PiS bills — were still not acceptable.

The socially conservative PiS, in power since late 2015, is already at loggerheads with fellow members of the European Union over migration policy, its push to bring state media under more direct government control, as well as over an earlier overhaul of its constitutional tribunal.

Kaczynski was in parliament on Friday, for one stretch reading a book about cats. The lifelong bachelor has previously donated a portion of his salary to a cat charity.

Also on Friday, PiS deputies gave initial approval to a bill amending the electoral system, which the opposition said would threaten the fairness of elections.

The proposal would introduce live web feeds from polling stations, but also replace all current members of the State Electoral Commission, a body responsible for conducting and overseeing elections, as well as all election commissioners, giving political parties more say in naming new ones.

"This bill is a thuggish project. This is a mine placed under elections in Poland," the head of opposition PSL party, Wladyslaw Kosiniak-Kamysz said Thursday in parliament.

According to the 72-page long amendment that did not undergo any public consultations, seven of the nine members of the State Electoral Commission would be chosen by parliament for nine-year terms, with PiS set to directly appoint three members and the remaining parties four.

Poles protest plans by the ruling populist party for laws that would give it greater control over the courts and the National Electoral Commission, in Warsaw on Friday. (Czarek Sokolowski/Associated Press)

Opponents of the policies held demonstrations in cities across the country later on Friday to protest the planned changes.

Demonstrators rallied under the slogan "free courts, free elections, free Poland." Protests were also held abroad, including in Chicago, London and Dublin.

Two other bills on the judicial system that sparked large protests in the summer were blocked by the president but have returned to the legislature in modified form. The lawmakers sent them for fine-tuning to a specialized commission and a vote on a final version could be held in early December.