WARSAW, Poland — The Polish attorney general’s office has described as partly unconstitutional the Holocaust law that was meant to defend Poland’s image abroad but instead drew criticism from Israel, Ukraine, and the United States.

The statement published Thursday came as a surprise, as Prosecutor General Zbigniew Ziobro is also the head of the justice ministry that came up with the controversial law.

The legislation, which came into force earlier this month, imposes fines or up to three years in jail on anyone who ascribes “responsibility or co-responsibility to the Polish nation or state for crimes committed by the German Third Reich.”

Get The Times of Israel's Daily Edition by email and never miss our top stories Free Sign Up

The attorney general’s office published its statement on the website of the Constitutional Court, which was tasked by the president with checking whether the law was constitutional.

The office said that penalizing acts committed abroad independently of the laws in place there was against the Constitution, which opposes “excessive interference.”

It added that the law was “dysfunctional,” could have “opposite results than those intended,” and could “undermine the Polish state’s authority.”

Polish officials have been taking part in talks in Israel aimed at damage control after an angry dispute triggered by the Polish law, which makes it a crime punishable by up to three years of prison to publicly and falsely blame Poland for Nazi Holocaust atrocities.

The Polish government says it is a necessary tool to fight cases in which Poland is inaccurately blamed for German crimes that were carried out in occupied Poland during World War II.

Israel and other critics, however, fear that the law — which is in any case unenforceable outside of Poland — is really aimed at trying to stifle research and discussion within Poland into anti-Jewish wartime violence, something that casts a shadow over Polish wartime behavior that was otherwise mostly honorable and marked by profound suffering.

Amid the heated debates, Prime Minister Mateusz Morawiecki also sparked criticism with comments seen as insensitive and historically wrong.

At a forum of world leaders in Munich last month he listed “Jewish perpetrators” of the Holocaust along with German, Ukrainian, Russian, and Polish perpetrators, seeming also to suggest that Jews were partly responsible for their own genocide.

AP contributed to this report