The High Court in Kenya has blocked the government’s bid to close the largest refugee camp in the world.
A directive to shut the Dadaab camp and forcibly repatriate about 260,000 Somali refugees living there was issued last year.
The deadline for its closure had been extended until May, but a high court judge ruled the decision was tantamount to an act of group persecution.
The government had argued it was an issue of security.
It said that attacks on its soil by the Somalia-based al-Shabab group had been planned in the camp.
“The government’s decision specifically targeting Somali refugees is act of group persecution, illegal discriminatory and therefore unconstitutional,” Judge John Mativo said.
The orders are excessive, arbitrary and disproportionate, he said.
The BBC’s Nancy Kacungira in the capital, Nairobi, says the government could still appeal against the court’s decision, but the ruling means it has to start putting in place mechanisms that will restore regular operations at the camp.
Amnesty International welcomed the ruling, saying it affirmed Kenya’s legal obligation to protect people who seek safety from harm and persecution.
“Today is a historic day for more than a quarter of a million refugees who were at risk of being forcefully returned to Somalia, where they would have been at serious risk of human rights abuses,” the rights group’s Muthoni Wanyeki said in a statement.
Somalia’s UN-backed government, with the help of a 22,000-strong African Union force, is battling Islamist group al-Shabab to regain control of the country.
But it has only managed to secure major towns.
The militants, who impose a strict version of Islam in the areas they control, still mount deadly bombings and have carried out a string of attacks in neighbouring Kenya.