MOSCOW — Russian President Vladimir Putin on Monday signed new legislation introducing harsh punishments for the justification or denial of Nazi war crimes.

The legislation makes it a criminal offence to deny facts established by the Nuremberg trials regarding the crimes of the Axis powers and to disseminate “false information about Soviet actions” during World War II.

Such acts are punishable by up to five years in a prison camp or a fine of 500,000 rubles ($14,000), the law says. Those making such claims in mass media are liable for the harshest punishments.

The legislation was voted through by Russia’s upper and lower houses of parliament last month.

It comes as Russia makes more and more explicit comparisons between Ukrainian nationalists and Nazi war criminals.

It regularly condemns the Kiev authorities as supporters of Stepan Bandera, a wartime nationalist leader who collaborated with the Nazis.

Pro-Kremlin lawmaker Leonid Slutsky has compared the Odessa blaze in which at least 42 died amid clashes between pro-Moscow activists and pro-Kiev protesters last week to the Auschwitz death camp.

Russia takes enormous pride in the Soviet victory over the Nazis in World War II that came after the price of some 30 million dead.

Its laws already ban public display of Nazi symbols and the distribution of Nazi texts.

Russia will mark World War II victory over the Nazis on Friday in celebrations that are expected to be particularly grandiose this year after its annexation of Crimea in March.