On Wednesday, the higher Court in Kenya, blocked the government orders saving thousands of refugees from repatriation.
The Kenyan high court has declared plans to close the world's largest refugee camp and send more than 300,000 refugees to war-torn Somalia as "unlawful".
Judge John M. Mativo said in the judgment Thursday that the plans to close Dadaab and repatriate Somali refugees violate the global legal principle of non-refoulment, described in the 1951 Refugee Convention.
A Ministry of the Interior official, Mwenda Njoka, said the Kenyan government will appeal the ruling because the reason for closing the camp remains.
Locator map of Dadaab refugee camp in Kenya.
The Kenyan government's decision stirred outrage prompting two local human rights organisations, Kenya National Commission on Human Rights and Kituo Cha Sheria, to challenge the government's directive arguing it was discriminatory and in breach of global laws.
Last May, the Kenya government cited security concerns as it announced it would close the camp, located in northeastern Kenya near the Somali border.
The government also said it would close the Department of Refugee Affairs.
Amnesty International praised the court's decision, saying it "reaffirms Kenya's constitutional and international legal obligation" to protect those who seek safety from persecution. Amnesty International added on its tweet that now, durable solutions for refugees have to be found.
Most people in Dadaab came from Somalia after the conflict intensified and drought followed by a food crisis wrought havoc on Southern parts of the country.
The move, according to Justice John Mativo was 'an act of somali refugees persecution'.
Last year, Human Rights Watch called the repatriation of Somalis from Dadaab a violation of global refugee standards.
The Kenyan government frequently targets ethnic Somalis in security raids, particularly in the Somali neighborhood of Eastleigh, near Nairobi.
A new president, Mohamed Abdullahi Mohamed, took office in Somalia on Wednesday.
In 2016 the USA accepted 11,000 Somali refugees.
However, these fruits rarely reach the local communities and a previous study by the government once found that refugees, who depend mainly on firewood for fuel, leave the areas more environmentally dilapidated than before. The government has dismissed that allegation.
So far, the Kenyan government is unwilling to accept the court ruling, but Kimani and other rights groups remain vigilant in case their victory is repealed.