WARSAW, Poland - Lawmakers from Poland’s ruling party defended proposed legislation that would give the government the power to fire and fine judges, arguing as debate on it began in parliament Thursday that the measure is needed to control growing anarchy in the justice system.

The conservative Law and Justice party introduced the bill in the lower house of parliament last week. If passed in its current form, the legislation would allow the government to discipline judges who speak out against changes the ruling party made to the judiciary, even when a jurist’s views conform with European Union law and Poland’s Constitution.

After a heated debate Thursday, lawmakers sent the legislation to a committee for further work. A deputy prime minister, Jaroslaw Gowin, said the work included removing some of the legislation’s most controversial parts.

The debate came after protests were held in cities across Poland in hopes of blocking the legislation, which critics consider repressive and a threat to democracy. Many people expressed fears that by defying EU law, the move in Poland would lead to the central European nation’s eventual departure from the 28-member bloc.

On Thursday evening, another protest took place in front of the parliament in Warsaw.

The members of Law and Justice, the populist party that has governed Poland since 2015, argued that many of the country’s judges have become too outspoken politically and are on the side of a liberal political opposition that seeks to block the party’s efforts to fulfil its democratic mandate.

The party drafted the legislation following a November ruling by the EU’s top court. The European Court of Justice decision left it up to Polish courts to determine if a new disciplinary chamber for judges within Poland’s Supreme Court and a separate council that appoints judges were sufficiently independent.

Justice Minister Zbigniew Ziobro told parliament the government would not buckle and intended to “bring the reforms to a conclusion.”

Borys Budka, a lawmaker with the centrist Civic Platform party, accused Law and Justice of taking control of the courts to protect itself.

“You know that the time of your defeat is approaching when you will be responsible for all these scandals before Polish courts,” Budka told the assembly.

“You are an anti-Polish, anti-European party, because what you are currently doing is moving Poland out of the EU,“ Budka said. “It is an attempt to introduce the standards of (Russian President Vladimir) Putin ... You want impunity, you want your judges who will acquit you later.”

Nearly 30 opposition lawmakers also faced criticism for failing to appear in parliament for an initial vote on whether to put the legislation on the agenda for the day. The decision to take up the legislation passed by nine votes.

They gave various reasons for their failure to show up, including family obligations. Some argued the ruling party would have ended up getting it on the agenda eventually anyway.