A federal judge ordered the Department of Homeland Security to set aside a plan that would make more people vulnerable to expedited deportation until a court can rule on the matter.

The lawsuit, filed by We Count! and other immigration advocates, asked a Washington court to overturn a plan making undocumented people eligible for deportation without court oversight unless they could prove they had been in the country more than two years.

Judge Ketanji Brown Jackson of the US District Court for the District of Columbia granted a preliminary injunction on Friday, setting aside the rule until it can be litigated, saying that the people represented by the immigration advocates “would be irreparably harmed by the challenged agency action.”

Previously, only those immigrants detained within 100 miles (161 kilometers) of the border who had been in the country two weeks or less could be ordered rapidly deported.

The policymakers an exception for immigrants who can establish a “credible fear” of persecution in their home country.

Also on Friday, a federal judge in California blocked a Trump administration rule that would have allowed indefinite detention of migrant families, saying it was inconsistent with a decades-old court settlement that governs conditions for migrant children in US custody.