The president presented his own versions in the fall, which the ruling party then amended and approved on Friday.
Opponents said these new versions did little to dispel the original concerns. The Venice Commission, a legal group attached to the Council of Europe, said on Friday that the draft laws constituted a “serious threat to the independence of the judiciary.”
Nils Muiznieks, the council’s human rights commissioner, said that a recent visit to Warsaw had confirmed the threat to him. “These laws will further undermine the independence of the judiciary by subordinating it to the executive and the Legislature and will, thereby, further erode the separation of powers and the rule of law,” he said in a statement.
But a top presidential aide, Pawel Mucha, addressing Parliament on Friday, said the bills were in line with the Polish Constitution and were needed for “the reform of the judiciary.”
The swift vote came a day after the ruling party’s political committee decided to begin a long-planned ministerial reshuffle by removing Beata Szydlo as prime minister and replacing her with the finance minister, Mateusz Morawiecki.
Law and Justice officials said Mr. Morawiecki, who has a background in international banking, would be better able to explain Poland’s position to international critics. But their opponents said it was just a ploy to distract attention from Friday’s court bills.
Newsletter Sign Up
Thank you for subscribing.
An error has occurred. Please try again later.
You are already subscribed to this email.
Since Law and Justice took power in late 2015, relations between Warsaw and the European Union have been strained over concerns that Mr. Kaczynski was leading the country in an authoritarian direction.
This week, the European Commission voted to take Poland, Hungary and the Czech Republic before the International Court of Justice over the countries’ refusal to accept refugees.
Even before Friday’s vote, the commission had initiated a disciplinary process over the Polish court legislation that could result in sanctions or even a loss of voting rights.
Two bills were approved on Friday, the first involving the Supreme Court. Earlier legislation called for the entire court, made up of more than 80 judges, to be fired, with replacements appointed by the government.
The new version lowers the retirement age for the court’s judges to 65 from 70, effectively forcing the immediate removal of 40 percent of the justices. That bill was approved by a vote of 239 to 171.
The second bill covered the National Judiciary Council, which selects the candidates to be judges. Previously, 15 of the council’s 25 members were chosen by a panel of judges. Under the earlier proposal, those 15 would have needed approval by a majority vote in Parliament.
Under the new version passed on Friday, candidates would need a 60 percent vote, although subsequent amendments meant that could revert to a simple majority vote in time. It passed 237 to 166.
“A free and independent Supreme Council has just fallen,” said Monika Wielichowska, an opposition member of Parliament. “You have demolished the constitution and democracy. And now you’re destroying the National Judiciary Council.”
The bills must pass the Senate — a foregone conclusion given the ruling party’s dominance in that chamber — and then be signed by the president. Mr. Duda is expected to do so this time, since their passage followed months of closed-door talks with Mr. Kaczynski over the legislation.