TEL AVIV - Thousands of African migrants, many holding banners demanding freedom for compatriots jailed by Israel, protested on Sunday in a Tel Aviv square against a new open-ended detention law which allows migrants to be sent to a desert prison.

The protests prompted a rare and strongly worded statement from the U.N. refugee agency, saying that Israel's incarceration of migrants, including family breadwinners, caused "hardship and suffering" and was "not in line with" a 1951 world treaty on the treatment of refugees.

Human rights groups say more than 300 people have been arrested since the law, which allows authorities to detain migrants without valid visas indefinitely, was passed by Israel's parliament three weeks ago.

Dozens more have been summoned for detention, among them men with wives and children, rights activists and the UNHCR said.

Some 60,000 migrants, largely from Eritrea and Sudan, have crossed into Israel across a once-porous border with Egypt since 2006, Israeli authorities say.

Many live in poor areas of Tel Aviv and say they want asylum and safe haven. Prime Minister Benjamin Netanyahu has said he views the presence of many of the Africans as a threat to Israel's Jewish social fabric.

View gallery African migrants take part in a protest at Rabin Square in Tel Aviv January 5, 2014. REUTERS/Nir Eli …

An Israeli border fence has cut off the African influx from Egypt since 2012, but migrants who have already crossed can be sent to what the government describes as an open prison in Israel's southern desert.

The new facility, which was the focal point of the protests by some 10,000 in Tel Aviv, is similar to a half-way house. Detainees can leave during the day but must report back by nightfall. Migrants can be held there without a time limit pending voluntary repatriation, implementation of deportation orders or resolution of their asylum requests.

In a written statement, Walpurga Englbrecht, the UNHCR representative in Israel, said she was "particularly disquieted" about the newest Israeli facility that "would appear to operate as a detention center from where there is no release. This means in effect indefinite detention."

She urged Israel to look for new solutions, saying that "warehousing" refugees was not "in line with the 1951 Refugee Convention."

Englbrecht also slammed Israel's labeling of many migrants as "infiltrators," saying most were refugees or deserved international protection.

"Placing asylum-seekers in duress that may force them to opt to return without having examined their asylum claims could amount to a violation" of the refugee convention, she said.

Hotline for Migrant Workers, an organization that advocates for the Africans, accuses Israel of pressuring hundreds in its jails to accept payouts and leave. More than a dozen left earlier this year for Eritrea to win release from prison.