A plane packed with around 50 Cambodian Americans set for deportation was scheduled to depart on Monday from Texas for Phnom Penh. But a court order issued late Thursday has blocked, at least for now, the Trump administration’s plan to expel them.

A US district-court judge granted a month-long temporary restraining order after attorneys argued that—in the course of raiding, apprehending, detaining, and attempting to deport more than 100 people to Cambodia in recent weeks—Immigration and Customs Enforcement denied people due process and violated the agency’s own procedures.

The restraining order doesn’t cancel the deportation orders. But it does offer these Cambodian nationals, many of whom are refugees and have lived in the United States for decades, time to sort out their cases. The request for a temporary restraining order was filed last Monday as part of a lawsuit brought by the Northern and Southern California chapters of the umbrella civil-rights organization Asian Americans Advancing Justice, and the next hearing in the lawsuit is scheduled for January 11, 2018. (Disclosure: My father, an immigration-law professor, filed a document in support of the lawsuit. I learned of this not from him but in the course of my own reporting.)

More striking than the temporary reprieve this offers Cambodian Americans facing deportation is the utter rarity of such a move. As a matter of course, judges do not stop deportation flights days before departure. Immigration attorneys defending the Cambodian community say their frantic work in recent weeks has been prompted by the unprecedented speed with which the federal government has sought to deport Cambodians from the United States. The restraining order is proof of how reckless the federal government under Donald Trump has become in its all-out push to detain and deport immigrants.

“It’s definitely extraordinary,” said Laboni Hoq, litigation director at Asian Americans Advancing Justice–Los Angeles. “But I think we are in extraordinary times in terms of how the government is treating people.”

For Cambodian Americans swept up in this latest enforcement attempt, the panic began in early October when ICE began arresting people who reported for routine check-ins at their local ICE office or who, at the agency’s direction, came to ICE on their own. More than 100 Cambodians were arrested and detained in October. That number alone gave immigration attorneys cause for alarm.

“This is my seventh round of raids [on the Cambodian community] since I started working at the Asian Law Caucus in 2010,” said Anoop Prasad, senior staff attorney at the San Francisco-based Asian Americans Advancing Justice-Asian Law Caucus. “It’s always chaotic. But normally they are a fifth of the size.”

Typically, when immigration attorneys get word that people are getting picked up, they head to detention centers to talk to detainees so they can understand the circumstances of their arrests and immigration records. “But the numbers were so overwhelming this time we were struggling to do even that,” Prasad said. “Our phones were ringing constantly.”

What became clear was that the federal government was identifying Cambodians with deportation orders and apprehending as many people as they could as quickly as they could, Prasad said, without following proper regulations which dictate how ICE should go about detaining people.

The arrests surprised the Southeast Asian community alongside reports of similar mass arrests of Vietnamese Americans. “Individuals were often convicted when they were teens or young adults,” said Katrina Dizon Mariategue, immigration-policy manager with the Southeast Asian Resource Action Center. Their convictions are for crimes like domestic violence, weapons possession, joyriding, and assault. In the intervening years, they’ve cleaned up their lives, and “have been going in for check-ins for years, sometimes decades. Now they’re in shock that all of a sudden ICE is rounding them up to remove them.”

ICE began apprehending people in California, home to the largest Cambodian population outside of Cambodia, as well as Massachusetts, Washington, Minnesota, Oregon, Texas, and North and South Carolina, Mariategue said.

After making arrests, the federal government moved detainees around the country to Louisiana, and for some back to California, and then on to Arizona and Texas, making it impossible for attorneys to have meaningful access to their clients.

“The process of getting people to and from Louisiana took days, and they were shackled the entire time, and didn’t get showers and medication, and often missed a lot of meals,” Prasad said.

This treatment violated ICE’s own regulations, Prasad argued. People, even noncitizens with deportation orders, have a right to due process.

The Cambodian Americans represented in the lawsuit all have some kind of criminal conviction that at one point made them eligible for deportation, even though they had once been legal permanent residents. All had served criminal sentences, been detained by ICE, and been released after the federal government determined that they were neither a national security nor a flight risk.

Advocates estimate that in all, there are 1,900 Cambodians across the United States who are in a similar immigration situation.

For years, as a result of strained diplomatic relations between the two countries, Cambodia did not accept deportees from the United States or, when it began repatriating people in 2002, accepted only a couple dozen at a time. So deporting people to Cambodia has long been a slow, and tricky, effort. But the federal government can’t lock up people with deportation orders indefinitely. (Incidentally, that constraint comes from a 2001 Supreme Court case involving a Cambodian man whom the United States was attempting to deport.) Because of this, the federal government has for years been compelled to release Cambodians from immigration detention.

But in order to re-detain a person who’s been previously released, the federal government must show that a person has newly become a national security or flight risk, or have a reasonable belief that the person they’re detaining will be granted travel documents. “They have to have some cause to believe there’s some reason to detain someone before they carry out this indiscriminate sweep,” Prasad said.

For Cambodians in particular, this has often required another step. The Cambodian government screens potential deportees before offering travel documents, and has the right to deny admission to someone if, say, because of health problems they’d be a strain on the Cambodian government, Prasad said. Typically, the Cambodian consulate first calls those the United States is seeking to deport in to its offices for a screening interview, then issues travel documents to those it has agreed to accept, only after which the government will move to apprehend someone and deport them.

But ICE didn’t do that, attorneys argued. “They just grabbed people, handcuffed them, and took them to a detention center,” Prasad said. The federal government did not prove why any of the potential deportees had all of a sudden become a national security or flight risk; it did not offer people an opportunity to refute such a characterization, as it’s also required to do; and it sent this newly apprehended group of people to screenings with the Cambodian consulate only after they’d been detained. Even then, Prasad said, the Cambodian government did not even give travel documents to all of the roughly 100 Cambodians who were arrested this fall.

“They’ve been very overt about the fact that they want to scale down people’s due-process rights to levels that we think are unlawful,” Hoq said about ICE.

ICE spokesman Brendan Raedy declined to comment on the ongoing litigation, but said, “ICE does not conduct sweeps or raids that target aliens indiscriminately. However, as DHS leadership has made clear, ICE will no longer exempt classes or categories of removable aliens from potential enforcement.”

“ICE focuses its enforcement resources on individuals who pose a threat to national security, public safety, and border security,” Raedy said. “ICE conducts targeted immigration enforcement in compliance with federal law and agency policy. All of those in violation of the immigration laws may be subject to immigration arrest, detention, and, if found removable by final order, removal from the United States.”

Indeed, the United States moved swiftly to deport those rounded up in the October raids. While Cambodia typically takes four to five months to issue travel documents, this time Cambodia announced that it had issued 78 travel documents just eight weeks after the first reports of raids, a move that Hoq chalked up to diplomatic pressure that the US successfully placed on Cambodia after Trump’s visit to Asia last month.

In that short period of time, attorneys began digging in to detainees’ cases. What they learned is that the criminal convictions for many were often decades old and in the intervening years, people had gone on to raise families, hold down steady jobs, and serve their communities. Many have US citizen children; some are even US military veterans. All arrived in the United States as child refugees, and many were born in refugee camps in Thailand and so face deportation to a country they’ve never set foot in. Many have no contacts or living relatives in their supposed “home country.” All of these so-called equities made them good cases for having their deportation cases examined on the merits before they were secreted out of the country, attorneys argue.

Some of these detainees’ cases are so compelling that in the last week since hearing about the flight that was set for Monday attorneys had been able to win temporary stays on deportation orders for at least four Cambodian Americans among the15 people that immigration attorneys were able to interview in Northern California. Judges have agreed that at least a quarter of the Cambodians set for deportation had a right to have their deportation orders reexamined. This, too, suggests that the federal government, in its sloppy haste to remove people from the country, has infringed on people’s basic rights.

These Cambodian Americans, who have lived in the country for decades, “should at least get a chance to look at their cases before they get deported,” Prasad said.

Hoq said that, even in this new political moment where Trump has authorized ICE to detain and deport anyone who has a final order of removal against them, people still have rights. “This [restraining order] gives hope that people should still exercise their rights and still try to use the systems that are in place to try to challenge what’s going on,” Hoq added.

The flight scheduled for Monday was also set to include people who were to be deported to Vietnam and the Philippines, according to Prasad. They are not covered by the restraining order. ICE, citing operational security, would not comment on whether that set of people will still be deported this week.