WARSAW, Poland — A diplomatic dispute between Poland and Israel over pending legislation that would outlaw blaming Poland for the crimes of the Holocaust has led to an outburst of anti-Semitic comments in Poland, including some in the government-controlled media.

Poland’s lower house of parliament gave its approval Friday to the bill, which calls for penalties of up to three years in prison for anyone who “publicly and against the facts” accuses the Polish people of crimes committed by Nazi Germany during World War II.

Poland’s ruling Law and Justice party says the law is meant to fight expressions like “Polish death camps,” to refer to the wartime camps that Nazi Germany operated in occupied Poland. Poles were among those imprisoned, tortured and killed in the camps, and many today feel Poles are being unfairly depicted as perpetrators of the Holocaust.

As part of the same effort, the government launched a website on Tuesday in Polish, German and English with documentary evidence that death camps like Auschwitz were built and operated by Nazi Germany, a historically accurate account.

Germany occupied Poland in 1939, annexing part of it to Germany and directly governing the rest. Unlike other countries occupied by Germany at the time, there was no collaborationist government in Poland. The prewar Polish government and military fled into exile, except for an underground resistance army that fought the Nazis inside the country.

The Israeli government in the past has supported the campaign against the phrase “Polish death camps,” but it has strongly criticized the new legislation, which still must be approved by the Senate and President Andrzej Duda, who both support it.

Israel, along with several international Holocaust organizations and many critics in Poland, argues that the law could have a chilling effect on debating history, harming freedom of expression and leading to a whitewashing of Poland’s wartime history, which also includes episodes of Poles killing Jews or denouncing them to the Germans.

Polish Holocaust and World War II scholars, as well as international organizations including Yad Vashem, the U.S. Holocaust Memorial Museum and the Wiesenthal Center, are among groups who have criticized the law. Critics have said they fear the law could lead to self-censorship in academia and that the legislation — which also mentions “other crimes against peace and humanity” — is so broad that it could be used to fight any form of criticism against Poland by authorities already accused of eroding democratic standards.

In a sign of the sensitivities on both sides, Yair Lapid, head of Israel’s centrist Yesh Atid party and the son of a Holocaust survivor, insisted in a heated Twitter exchange with the Polish Embassy that “there were Polish death camps and no law can ever change that.” An Israeli journalist, Lahav Harkov, also wrote a tweet that consisted only of the phrase “Polish death camps” repeated 14 times.

Such Israeli remarks offended many in Poland, including many who oppose the law and any expressions of anti-Semitism in Poland.

Far-right groups have called for a demonstration Wednesday in front of the Israeli Embassy in Warsaw to protest the “anti-Polish” sentiment they say is being propagated by Israel and some media.

And there has been an eruption of anti-Israel and anti-Jewish comments online and in the media, including in state media, which is tightly controlled by the right-wing ruling Law and Justice party.

The director of the state-run television station TVP 2, Marcin Wolski, even went so far as to say Monday on air that the Nazi death camps should actually be called Jewish. “Who managed the crematoria there?” he asked — a reference to the fact that death camp prisoners, usually Jews, were forced to help dispose of gas chamber victims.

Wolski was joined on his show by a right-wing commentator, Rafal Ziemkiewicz, who only a day earlier had used an extremely derogatory term to refer to Jews on Twitter. The comment was later removed.

And on another talk show Saturday on Polish state TV, anti-Semitic messages posted by viewers on Twitter were shown at the bottom of the screen as one participant said that a Jewish guest was “not really Polish.” The state TV director later apologized for the messages, blaming a technical glitch that caused them to go onto the screen unedited.

In another case, a Polish state radio commentator, Piotr Nisztor, suggested that Poles who support the Israeli position should consider relinquishing their citizenship.

“If somebody acts as a spokesman for Israeli interests, maybe they should think about giving up their Polish citizenship and accepting Israeli citizenship,” Nisztor said in a comment carried on the radio’s official Twitter account.

Some commentators in Poland, however, expressed dismay, saying it reminded them of an official state-sponsored anti-Semitic campaign carried out by Communist authorities in 1968.

“There has been a lot of hate speech against refugees and Muslims over the past two years in state media, but anti-Semitism was so far rare,” said Rafal Pankowski, who monitors anti-Semitism and other forms of extremism as head of the Never Again association. “But in the last couple of days it seems the floodgates have opened.”

Israeli Prime Minister Benjamin Netanyahu and Polish Prime Minister Mateusz Morawiecki agreed after speaking by phone Sunday night to try to resolve differences over the legislation by convening a group of history experts, though it was unclear how effective that will be given the strong support for the bill by the ruling Law and Justice party.

Before the outbreak of World War II, Jews had lived in Poland for centuries, thriving in some eras and even becoming the world’s largest Jewish population at one point. But anti-Semitism in the decades before the war had grown virulent, driving many Polish Jews to emigrate.

Relations between Jews and Poles had seen efforts of reconciliation since the fall of communism, but some fear the current controversy has set that back.

Agnieszka Markiewicz, Central Europe director for AJC, a Jewish global advocacy group, called the language on state media “shocking.”

“It is hard to imagine that there is actually space in the Polish public sphere for such anti-Semitic language and discourse,” she told The Associated Press. “It’s unacceptable, I believe, not only for Polish Jews, but also for millions of Poles who know World War II history.”