Thousands of immigrants from El Salvador, Haiti, Nicaragua and Sudan are breathing sighs of relief: For now, they can stay.

A federal judge ruled on Wednesday that the Trump administration could not immediately end special protections for people from those countries, which have been ravaged by wars and natural disasters.

The immigrants’ ultimate status in the United States remains in limbo, but the ruling means that they can continue to live and work legally in the country, as many of them have done for decades. More than 263,000 Salvadorans, nearly 59,000 Haitians, more than 5,000 Nicaraguans and more than 1,000 Sudanese have the designation, known as temporary protected status, which alone does not offer a path to permanent residency.

Many of them had wrestled for months with what to do after the government announced it would end their protections. Would they risk staying in the United States? Take their American-born children to a country they do not know? Or split their families apart and return to countries they once desperately escaped?