More than a quarter of a million Somali refugees got a huge break on Thursday.

A Kenyan judge ruled that the Kenyan government’s contentious plan to close Dadaab, the world’s largest refugee camp, was “illegal” and “discriminatory,” and that the refugees could not be forcefully relocated.

For years, Kenya has threatened to shut the sprawling camp, a crowded, sweltering realm near Kenya’s border with Somalia that has been a refuge for desperate people since Somalis began fleeing to Kenya in 1991, when their country was plunged into civil war.

The government has said the camp is a breeding ground for Islamist terrorists, though the evidence is mixed for how central it really is to Kenya’s terrorism problem, which has claimed hundreds of lives in recent years.

The vast majority of refugees who live in Dadaab are Somalis, too scared to return home to a nation plagued by war, famine, chaos, poverty and disease.