More than 2,000 Hungarians, including Roma families and civil groups, marched to parliament on Sunday to protest against the government's refusal to pay compensation to Roma children who had been unlawfully segregated in a school in eastern Hungary.

Nationalist prime minister Viktor Orban, who has come under fire from the European Union for his perceived erosion of the rule of law, suggested the state should disobey court orders to pay compensation to Roma children in the village of Gyongyospata and provide training instead.

Lower courts have ordered the state to pay damages in a lawsuit that has been dragging on for almost a decade. Hungary's top court is due to make a final ruling soon.

With the economy slowing, and his anti-immigration campaign losing steam, analysts say Mr Orban is seeking to mobilise his voters by targeting independent courts, the Roma minority, and the NGOs which help them.

“The meddling of the government in the Gyongyospata restitution issue is unlawful and violates the rule of law and the independence of the courts,” protest organisers said on Facebook.

Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart Show all 9 1 /9 Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart 621036.bin Life in Gyongyospata: Members of the local 'Mafia' gang MIMI MOLLICA Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart 621037.bin Florian Lakatos, whose two Dutch horses have won him five international competitions MIMI MOLLICA Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart 621038.bin The community's housing is under constant threat of flooding, making living conditions extremely demanding for villagers MIMI MOLLICA Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart 621039.bin A 'Mafia' member in his newly renovated house MIMI MOLLICA Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart 621040.bin Kalman Kali-Horvath at a charity centre for the homeless, poor and Romanies MIMI MOLLICA Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart 621042.bin A recycling warehouse run by the charity MIMI MOLLICA Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart 621041.bin The renowned Romany poet Jozsef Choli Daroczi in Tarnabod MIMI MOLLICA Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart 621043.bin Janos Farkas Senior, chief of the Gyongyospata Romany settlement MIMI MOLLICA Hungary in crisis: Tensions with its gypsy population threaten to rip the Eastern European country apart 621044.bin On the outskirts: Many of the houses in the Romany settlement are structurally unstable MIMI MOLLICA

Protesters held up banners saying “No one is above the law” and “The future cannot be built on hatred”.

Mr Orban has been in power since 2010 and his ruling Fidesz party is leading in opinion polls because of its anti-immigration stance.

However, the Fidesz party suffered a surprise setback in a municipal election last October, losing Budapest to the opposition.

Mr Orban has said “a court ruling citing segregation has stirred up public opinion by awarding large sums of money to some Roma residents,” adding that everyone must work to receive money.

He has also said “business-savvy lawyers” exploited overcrowded prison conditions to launch 12,000 lawsuits against the government for breaking EU prison standards. Senior lawyers said Mr Orban was undermining the rule of law.

The Fidesz party has said people connected with Hungarian-born billionaire George Soros helped Roma launch the lawsuits. The party has campaigned for years against Mr Soros, who promotes liberal causes.

By Sunday, close to 500 psychologists had signed a petition saying that the government campaign could fuel hatred between Roma and non-Roma. Roma make up 5-7 per cent of Hungary's population.

Robert Laszlo, an analyst at liberal think-tank Political Capital, said Mr Orban was trying to energise his base with his new campaign.

This will include a “national consultation” next month when questionnaires will be sent to millions of Hungarians on the issues of payments to Roma and compensation for prisoners.