The United Nations has urged European Union members to stop returning asylum seekers to Hungary, blaming the country's tough new policy of systematically detaining them in high-security container camps.

Refugees and migrants have long suffered dire living conditions in Hungary, a country accused by rights groups of "breaking all the rules" for asylum seekers, including vicious beatings and violent pushbacks by security forces.

"The situation for asylum seekers in Hungary, which was already of deep concern to UNHCR, has only gotten worse since the new law introducing mandatory detention for asylum seekers came into effect," Filippo Grandi, the UN's high commissioner for refugees, said on Monday.

READ MORE: Hungary passes bill to detain all asylum seekers

Since the law came into force on March 28, all new asylum seekers, including children, have been "detained in shipping containers surrounded by high razor fences at the border for the entire length of their asylum procedures", according to UNHCR.

Some 110 people, including four unaccompanied children and children with their families, are being held there currently.

The agency also said it remained very concerned over "highly disturbing reports of serious incidents of ill-treatment and violence" against people crossing the border into Hungary, including by state agents.

"These unacceptable practices must be brought to an end," Grandi said, urging Hungary to investigate abuse allegations.

Cecile Pouilly, a UNHCR spokeswoman for Europe, told Al Jazeera that asylum seekers could be detained for up to 12 months.

The containers are "definitely not a place where you would like children to be accommodated nor detained", she said, adding that they did not have space for beds, wardrobes or chairs.

While other countries also detain asylum seekers, Pouilly said Hungary's new law was extremely worrying because it makes detention "systematic and mandatory".

Some 324 shipping container homes have been installed at two separate locations called "transit zones", according to the government. They are built into a fence that Hungary erected along its 175km-long southern border in 2015.

OPINION: Hungary should be kicked out of the EU

Defending the measure earlier this year, Prime Minister Viktor Orban said it was needed as a response to "terror" attacks in Europe, citing the November 2015 attacks in Paris.

The move reinstates Hungary's practice of detaining asylum applicants, which it suspended in 2013 under pressure from human rights groups.

The UNHCR warned last month that the practice would "have a terrible physical and psychological impact on women, children and men who have already greatly suffered."

In October last year, the majority of Hungarians voted against an EU referendum aimed at sharing 160,000 refugees around the 28-member bloc through mandatory quotas.

It has since not accepted any asylum seekers allocated under the scheme.

Hungary granted asylum, or some form of protection, to 425 people out of 29,432 applications in 2016. 

Source: Al Jazeera and news agencies