WARSAW — Just a few months after making it illegal to accuse the Polish nation of complicity in the Holocaust, Poland moved on Wednesday to defang the controversial law by eliminating criminal penalties for violators.

The United States and other traditional allies had excoriated the Polish government over the law, passed in February, condemning it as largely unenforceable, a threat to free speech, and an act of historical revisionism.

Although both ethnic Poles and Jews living in Poland suffered unfathomable loss during World War II, the law drove a wedge between Israel and Poland, setting back years of hard work to repair bitter feelings.

The lower house of Parliament voted Wednesday morning to remove the criminal penalties, after an emotional session that saw one nationalist lawmaker try to block access to the podium. The upper house was expected to follow suit, and President Andrzej Duda was expected to sign the measure.

By amending the statute, the governing Law and Justice party hoped to repair some of the diplomatic damage it had caused, even as it pressed ahead with sweeping judicial overhauls that have been condemned by European Union leaders as a threat to the rule of law.

The European Commission, the bloc’s executive arm, has started proceedings that could strip Poland of its voting rights under Article 7 of the European Union’s founding treaty, the first time it has taken such a step against any member country.

During a hearing in Luxembourg on Tuesday, Polish leaders were grilled for some three hours by European leaders who are weighing what actions to take should Poland continue on its current course. The hearing did not seem to produce any substantive results.

“The systemic threat for the rule of law persists,” Frans Timmermans, the European Commission vice president, said at a news conference after the hearing. “So for us to be able to say that it no longer persists, we will need some more steps from the Polish side.”

“We have not had any indications of that today,” he said.

Konrad Szymanski, Poland’s deputy foreign minister, said after the meeting that it was not clear what would happen next in a dispute that he said had thrust the bloc of nations into an “unknown land.”

The Polish prime minister, Mateusz Morawiecki, said that he “deplored” the threats of the loss of voting rights, and said that the government would press ahead.

“Our partners don’t understand what the post-Communist reality looks like,” he said. “The justice system had a problem with self-cleansing.”

Critics say that argument is specious, noting that Communist rule ended nearly three decades ago, and that only a handful of judges from that era remain on the bench. Instead, they view the changes as an attempt by the Law and Justice party to gain control over the courts.

The party, which swept into power promising to rid Poland of corruption, has systematically moved over the past three years to assert control over all aspects of the judicial system — from the country’s Constitutional Tribunal to the body that selects the nation’s judges.

A new law targeting the Supreme Court, set to take effect on Tuesday, could lead to the forced resignation of nearly 40 percent of the current judges, including the court’s president. Any judge who wants to stay could do so only if the president agreed.

There will also be a new “extraordinary appeal” chamber within the Supreme Court, with the authority to reopen cases from the previous 20 years on request from the prosecutor general.

For those concerned about the state of the rule of law, the wrangling over the Holocaust law offers a window into how politicized the judicial system has already become. The law applies to statements made within Poland and beyond its borders.

When the law passed, Polish leaders said their goal was to ensure a full understanding of the tragic history of Poland during the war, when some three million ethnic Poles were killed along with three million Jews living in Poland — nearly half of all the Jews killed in the Holocaust.

Many Polish citizens have long objected to the use of the phrase “Polish death camps” to refer to the concentration camps installed and controlled by Nazi Germany. Poland never installed a collaborationist government: It ceased to exist as a nation after was invaded at the outset of the war and carved up by Germany and the Soviet Union.

As time passes, there is a legitimate fear in Poland that because many of the killing grounds located in Poland still remain the most powerful symbols of the horror of the Holocaust, historical memory will blur Poland’s complicated past.

The law, however, went further than trying to prevent the use of the phrase “Polish death camps.” It sought to criminalize any accusation that Polish nation was complicit in the carnage and was written in such a broad way that scholars, journalists and historians worried that it could be abused to stifle any discussion of the roles played by individual Poles.

As the bill was being debated, critics called it a violation of the country’s Constitution; normally, it would have been sent it to the Constitutional Tribunal for review.

At first, that did not happen. Mr. Duda signed the law in February and then sent it to the court for review, delaying implementation.

On Tuesday, the International Association of Jewish Lawyers and Jurists submitted an opinion to the Constitution Tribunal, saying that the imposition of “criminal restrictions on freedom of expression not only violates constitutional and international law’s standards but also harms Poland itself and its relations with the Jewish people.”

After the law was passed and the backlash grew, Zbigniew Ziobro, the minister of justice and Poland’s chief prosecutor, called the part of the law that targeted people outside Poland unconstitutional.

However, it was Mr. Ziobro’s own ministry that had drafted the law, and he personally had voted for it as a member of Parliament.

After months of defending the measure and calling attacks on Poland unfair, the governing party decided that the fastest course of action was to introduce an amendment that would scrap its most controversial elements. The party acknowledged that the law had done more to harm Poland’s reputation than enhance it.

Opposition lawmakers were incredulous at the position Poland was in. Stefan Niesiolowski, a lawmaker in the opposition party Civic Platform, called the original law “idiocy.”

And Kamila Gasiuk-Pihowicz, of the Modern party, wondered why it had taken so long to see how much harm the law had done.

“Why so late?” she said during the debate on Wednesday. “Why did so much have to be broken?”