Nagy, an unemployed computer technician, is the first Hungarian convicted under the country’s new Holocaust denial law which came into effect in February 2010. The Budapest court also gave him an 18-month suspended jail sentence.

If Nagy chooses to visit the local Holocaust memorial centre, he will have to make three trips and write down his thoughts and observations after the visits.

Nagy was arrested at a political rally in Budapest in 2011 when police noticed he was holding a banner with the words: “The Shoah didn’t happen.”

In the 2010 law, the Hungarian government made denial of the genocide committed by the Nazi regime a crime punishable by a maximum of three years in prison.

The bill to ban denial or questioning of the Holocaust was submitted by Attila Mesterhazy, chairman of the Hungarian Socialist Party.

Despite the new law, Hungary’s current prime minister, Viktor Orban, has been recently sharply criticised by many Jewish organisations for pandering to nationalists and tolerating antisemitism.

In one of the most notable cases, Mr Orban’s government was accused of having approved the naming of a park in Gyomro — a small town on the outskirts of Budapest — after Miklos Horthy, the country’s wartime leader and a close ally of Adolf Hitler.

Mr Orban has also been accused of failing to condemn antisemitic statements made in recent months by some members of far-right party Jobbik.