Hungary's parliament voted on Monday in favour of making Holocaust denial a criminal offence, punishable by up to three years imprisonment.
The law was passed in a final vote with 197 in favour, 1 against, and 142 abstentions.
It had been proposed by Attila Mesterhazy, prime ministerial candidate of the governing Hungarian Socialist Party.
A motion by the centre-right opposition party Fidesz to extend the law to cover the denial of other crimes committed under the Communist regime was rejected by 178 votes to 146, with seven abstentions.
The law, which is due to come into effect in 30 days, was passed on the final session of parliament until after general elections that are due to be held in April.
New legislation is subject to review by Hungarian President Laszlo Solyom, who has the power to return it to parliament for reconsideration.
Fidesz, whose lawmakers abstained in the final vote, is far ahead of the Socialists in opinion polls and is widely expected to form Hungary's next government.
Some 450,000 Hungarian Jews are thought to have perished during the closing months of the World War Two at the hands of the Hungarian fascist Arrow Cross Party, backed by Nazi Germany.
Want to enjoy 'Zen' reading - with no ads and just the article? Subscribe todaySubscribe now