WARSAW — President Andrzej Duda announced on Tuesday that he would sign into law a bill that makes it illegal to accuse “the Polish nation” of complicity in the Holocaust, but in a nod to critics, he asked the Constitutional Court to review the legislation.

In a speech broadcast live on Polish television and radio, Mr. Duda said that he was seeking the high court’s involvement because this “very painful, delicate issue” needed to be dealt with carefully, but that is unlikely to placate those who have accused his right-wing party of dangerous revisionism. It is unclear when a judicial review by the court, which is controlled by judges appointed by Mr. Duda’s party, might occur; the law would remain in effect until then. .

Brushing aside ferocious criticism from Israel, the United States, and independent scholars and experts, the party, Law and Justice, has pressed ahead with a law that opponents say could stifle free speech, and put questions of historical accuracy into the hands of judges and prosecutors who may be more motivated by politics than scholarship.

Mr. Duda said the Constitutional Court would determine whether the law violated free-speech protections, adding that if the law were upheld, he hoped that the court would make clear what specific kinds of speech could be prosecuted. He said the government wanted to be sure that survivors of war crimes felt free to tell their stories without fear.

For more than 20 minutes, he reviewed his country’s bloody history, noting time and again that both Poles and Jews died during the war. Like many Poles, he has a personal story of suffering, saying that his grandfather’s brother was killed by the Nazis.

“Those years when Poland was occupied by the Nazis was one of the darkest time in Poland’s history,” he said.

Polish officials have said they will work with Israel and others to ensure that the law would not affect the work of scholars and artists.

However, the law is part of a broader effort by the nationalist government to shape both memories of the country’s past and its vision for the future. The governing party has reshaped the courts and state media in ways that have brought condemnation from the European Union, which has accused it of undermining democracy.

The new law regulating speech about the Holocaust sets prison terms for using the phrase “Polish death camp” to refer to the concentration camps created on Polish soil by Nazi Germany during the war. It taps into the widespread feeling in Poland that the country’s wartime story is either not well known or misunderstood.

From 1939 to 1945, some six million Poles were killed, more than one-sixth of the population. Half of those were ethnic Jews.

At the outset of the war, Germany invaded from the west and the Soviet Union from the east; they partitioned Poland, which did not exist as an independent nation for more than five years. As a result, Prime Minister Mateusz Morawiecki told foreign journalists on Friday, it was not possible to blame the country for any of the horrors that took place during the war.

He compared it to a bandit invading a home with two families: If the bandit slaughtered one family and killed several members of the other, he asked, how could that second family bear any culpability in the crime.

Even those who oppose the law agree that the phrase “Polish death camp” is historically inaccurate. Both Israel and Germany have issued statements saying that the use of the phrase is wrong.

But it is the part of the law making it a crime to accuse the “Polish nation” of atrocities that has caused the deepest concern.

“Whoever claims, publicly and contrary to the facts,” the law reads, “that the Polish Nation or the Republic of Poland is responsible or co-responsible for Nazi crimes committed by the Third Reich or for other felonies that constitute crimes against peace, crimes against humanity or war crimes, or whoever otherwise grossly diminishes the responsibility of the true perpetrators of said crimes — shall be liable to a fine or imprisonment for up to three years.”

The Constitutional Court could decide uphold all of the law or none of it, or could strike down only those provisions that have drawn the harshest condemnation.

The Polish government has said repeatedly that it wants to work with Israel and other opponents to address their concerns. But on Monday, the government canceled a planned visit by the Israeli education minister, Naftali Bennett, after he criticized the law.

“The blood of Polish Jews cries from the ground, and no law will silence it,” Mr. Bennett said in response. “The Government of Poland canceled my visit, because I mentioned the crimes of its people. I am honored.”

“Now, the next generation has an important lesson about the Holocaust of our people, and I will ensure that they learn it,” he said, adding that the Polish government’s decision “has a role to play in Holocaust education, even if they intended it to achieve something else.”

Mr. Morawiecki, who called the fight over the law Poland’s “Rubicon,” told state-run television in an interview on Monday that it was too late to change the law.

He said that the “real intention” of the legislation was “not to write history differently” or to “cover it up.”