BUDAPEST, Hungary - Hungary should not allow security concerns to override the human rights of migrants, a U.N. migration expert said Wednesday.

Felipe Gonzalez Morales, the U.N. special rapporteur on migrant rights, said that Hungarian authorities should move families with children who are awaiting a ruling on their asylum applications from being detained in border transit zones to being placed in open reception centres.

Speaking at the end of an eight-day visit to Hungary, Gonzalez Morales also expressed concerns about Hungary’s restrictive asylum procedures and urged Prime Minister Viktor Orban’s government to end the migrant “crisis situation” it declared in 2016 because the flow of migrants has decreased greatly since then.

“The current situation is a completely different one than the one that existed four years ago,” he told reporters. “Security concerns, that are legitimate but which cannot override human rights, should be adapted to reality.”

Hungary built razor-wire fences on its southern borders in late 2015, the peak of the migrant crisis and when some 400,000 people passed through the country on their way to Western Europe. Orban has made migration the central issue of his government since 2015 and says that it will remain the most important question in Europe for decades to come. Orban is especially opposed by immigration by Muslims and says Hungary and Europe need to protect their Christian culture.

Tamas Menczer of the Foreign Ministry, said in a video posted on Facebook that migration “is not a resolved issue” and remains a security risk.

Migration is “not a problem we have left behind, rather, migration is the problem,” Menczer said in reply to the U.N. expert’s comments. “The fence will stay where it is as it serves the security of the Hungarian people.”

Gonzalez Morales was also critical of the “politicization of the issue of migration” in Hungary, including “xenophobic discourse” from government officials that he said has “scapegoated migrants” and led to the discrimination of non-white Hungarians as well.

He also panned laws adopted last year targeting civic groups helping asylum-seekers.

“The fact that certain behaviours that have been historically considered legitimate in democratic systems could end in criminal prosecution affects the way civil society can work freely and defend the human rights of the migrants and asylum-seekers,” Gonzalez Morales said.