The UN’s refugee agency Friday warned that Israel’s new rules allowing indefinite detention of asylum-seekers may violate international law.

The legislation, passed last month by the Knesset, allowed the incarceration of illegal migrants after June 2013 for up to a year without trial and to keep them indefinitely at a detention facility in southern Israel.

According to the AFP news agency, the spokesman for the UN high commissioner for refugees, said Israel’s new rules could open the door to indefinite detention of illegal migrants. Adrian Edwards said the Holot detention facility in Israel’s Negev Desert to house new arrivals is problematic.

“Since Holot is housing people who cannot be returned to their countries of origin for reasons to do with non-forced returns, we’re concerned that this facility will in effect result in indefinite detention with no release grounds,” Edwards told reporters.

“Indefinite detention certainly would be at odds with human rights norms,” he added.

In December the Israeli Supreme Court deemed a law to imprison illegal migrants for three years without trial unconstitutional, paving the way for the new law. The decision sparked successively larger protests by African migrants from Sudan and Eritrea, culminating with a demonstration earlier this week outside the Knesset. That new law is now being appealed to the Supreme Court.

The demonstrators have held protests throughout the week demanding to be recognized as refugees — with the accompanying international rights — rather than treated as illegal migrants. Israel has refused to recognize them as refugees.

There are currently upwards of 50,000 African migrants in Israel.

Israel’s Foreign Ministry said earlier this week that the Interior Ministry is examining hundreds of asylum requests in coordination with the UN High Commissioner for Refugees and that all applications are given “thorough treatment” and all international legal obligations are honored.

“Israel tries to balance the need to control its borders with the need to protect the human rights of those who enter,” it said.

AP contributed to this report.