8 January: The original version of this story said that 1,200 people remained in Agadez. The number should be 400. This has been corrected.

Authorities in Niger have arrested at least 335 Sudanese refugees, accusing them of burning down a refugee camp just outside the city of Agadez in the north of the country.

Officials said the camp was burned down after nearly 1,000 refugees protesting in front of the United Nations High Commissioner for Refugees (UNHCR) office in Agadez were forcibly dispersed.

For the last 20 days, these refugees and migrants, including women and children, said they had camped in front of the office, demanding better conditions, including healthcare and education. According to the UNHCR, these people were demanding relocation to Europe.

The sit-in was part of ongoing protests in Niger since early 2019.

On January 2, Niger's High Court ruled the sit-in was unlawful and ordered the refugees to move "before it was too late".

According to witnesses, the security guards tried to disperse protesters on Saturday by shooting in the air. However, more force was applied and injuries were reported in the ensuing violence after the refugees and migrants refused.

Video footage sent to Al Jazeera showed a man thrown off the roof of a building. The video was filmed by a Sudanese refugee who was loaded on a truck.

The sit-in outside the UNHCR office started in December [Al Jazeera]

Following their arrival back at the camp, about 15km (nine miles) outside Agadez, security forces fired tear gas to disperse crowds. A camp official said violence escalated again as people protested. UNHCR officials said the asylum seekers then set fire to the facility and a photographer on site said 290 out of the 331 shelters were gutted.

"It was very violent, they were beating people up. We have many injured here with us", Daoud, a refugee from Darfur, told Al Jazeera by phone.

In a news conference held at the High Court of Agadez on Monday, where only state-run newspapers were invited, procureur general Seyni Saidou confirmed that security agents had to force people to disperse, citing municipal bylaw violations.

"During the removal operation, 162 mobile phones were confiscated, 31 knives and 12 iron bars were also taken from the demonstrators and 335 people are now in custody," Saidou said.

80% of the reception centre destroyed by a minority of refugees from Darfur in Agadez who only want to hear about resettlement to Europe. Destroying the asylum space in #Niger or elsewhere is easier than building & protecting it. It is a sad day for refugee protection in Niger. pic.twitter.com/Uf2nK6cxed — vincent cochetel (@cochetel) January 4, 2020

What's striking is that you called them "#refugees" yourself, so they're not asylum seekers under process. Which not only gives them the right to ask for resettlement in #Europe, but to also hold accountable anyone denying them this. — Amera Markous (@MarkousAmera) January 4, 2020

Sources told Al Jazeera that the government is considering shutting down the camp.

One of the refugees at the camp told Al Jazeera that many asylum seekers had been waiting at the camp, located in a desert where temperatures often reached 50 degrees Celsius (122 degrees Fahrenheit) in the summer, for more than two years without any clear update on their status.

The group protesting outside the UNHCR office travelled to the city on foot to submit a letter detailing deteriorating conditions at the camp.

Alessadra Morelli, UNHCR representative in Niger, said she is meeting the local governor to express solidarity and find a solution for the victims of this "tragic and absurd situation".

"We are discussing with all humanitarian actors to find a permanent solution," Agadez mayor Maman Boukari said on Tuesday.

Following the crackdown on protesters, Daoud said he realised "abandonment and lack of hope prevailed with the camp almost completely burned" after he was brought back.

"For two days now, we are left in the middle of the desert without any assistance, only water. The camp has been burned," another refugee told Al Jazeera by phone.

The burned-down refugee camp just outside Agadez in Niger [Al Jazeera]

According to an aid worker in Agadez, dire conditions in the camp and slow asylum procedures have resulted in people leaving the city for Libya or Algeria or searching for other alternatives. Last year, hundreds left, including those who decided to return to Sudan.

"I'm not surprised that people are thinking of returning to Libya. Many have also left in the past and that includes unaccompanied minors,'' the aid worker added.

An aid worker in Agadez said 1,200 people remained for months at the camp, frustrated at UNHCR's handling of the situation. About 400 are still there.

According to UNHCR's Morelli, in September 2018, after long discussions involving local authorities, the Regional Directorate for Civil Status, Refugees and Migration started to process asylum claims.

To date, 184 refugee cards have been distributed. All the asylum-seekers are registered under UNHCR and can benefit from temporary protection in Niger.

In 2015, Niger adopted an asylum law and signed an agreement with UNHCR to host refugees and migrants from Libya as part of the Emergency Transit Mechanism project.

Agadez has been at the crossroads for trade and transit of migrants northwards to Libya, Algeria and the Mediterranean.

Niger, situated on the edge of the Sahara, hosts hundreds of thousands of Nigerians fleeing violence in the northern states of Nigeria as well as refugees from Mali.