WARSAW, Poland -- Poland's Senate opened debate Friday on a contentious draft law that would dismiss current Supreme Court judges and let the president appoint new ones.

Earlier, a special Senate commission swiftly reviewed and approved the bill, which critics say opens the door to political influence over the nation's top court. Tens of thousands of protesters took to the streets in Warsaw and other cities late Thursday into Friday, demanding it be repealed. A vote by the full Senate is expected later Friday.

Top judicial bodies in the neighboring Czech Republic took the unusual step of issuing a statement calling the latest steps by the Polish government "an unprecedented attack on judicial independence." The European Union has also condemned the proposed law and the speed with which it was pushed through.

The changes to Poland's legal system "represent an attack on the vary basis of the functioning of the democratic state," said the statement signed by the heads of the Czech Constitutional, Supreme and Supreme Administrative courts, along with the nation's Supreme Public Prosecutor.

Get Breaking News Delivered to Your Inbox

The Polish Senate, which like the lower house is comfortably controlled by the ruling conservative Law and Justice party that drafted the bill, faced down opposition senators who demanded they explain why the commission rejected over 130 amendments they had proposed.

Besides the power to appoint judges, the bill gives the president influence over them via regulatory power over the Supreme Court. It would also end the term of the court's current judges, except those chosen by the president. Critics say this violates the nation's constitution.

The ruling party says the judiciary needs radical reform to become efficient and reliable.

The law was adopted by lower house Thursday and needs only Senate approval before President Andrzej Duda, a lawyer himself, signs it into law.

European Council head Donald Tusk, Poland's former prime minister, has invited Duda to a dialogue over the issue. He says the proposed law contradicts EU values and is hurting Poland's international image.