Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

More than 1,400 Iraqi nationals who the federal government targeted for immediate deportation will get their day in court, a federal judge in Detroit ruled on Monday.

In a 35-page order, United States District Court Judge Mark Goldsmith granted a request for a preliminary injunction, saying the group of Iraqis — many of whom are in their home country's Christian minority — could face “grave harm and possible death” if returned to Iraq.

The government, Goldsmith ruled, had ignored “the compelling confluence of extraordinary circumstances” presented by the group and said its position is “inconsistent” with the Constitution.

Protesters rally outside the federal court just before a hearing to consider a class-action lawsuit filed on behalf of Iraqi nationals facing deportation on June 21, 2017 in Detroit. File Rebecca Cook / Reuters file

The government targeted the Iraqis, who have criminal convictions or overstayed their visas, over long-standing deportation orders. More than half had been in the United States for more than a decade because Iraq refused to issue travel documents, the ruling says.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

But Iraq's policy on travel documents changed after the Trump administration agreed to drop the country from its updated travel ban in March.

On June 11, Immigration and Customs Enforcement agents rounded up 114 Iraqi nationals in the Detroit-area, including Chaldean Christians who voted for the president but now fear what a Trump administration may portend.

“There is a great sense of betrayal and anger in the community,” Wisam Naoum, a Chaldean community leader and lawyer told NBC News last month.

Related: Members of Iraqi Religious Minority Who Supported Trump Detained by ICE

Christian minorities have faced especially brutal treatment under ISIS, although Goldsmith notes that others in the group, including Sunni Muslims, would likely be detained and possibly tortured by Iraqi security forces for associating with “western interests.”

Since the June 11 sweep, roughly 100 more Iraqis have been arrested, the ruling says, and transferred to 31 facilities in states ranging from California and New Mexico to Alabama and Texas, among others.

There, many detainees have been given little access to lawyers and other assistance, Goldsmith wrote.

Government lawyers, meanwhile, have argued that immigration courts — not federal ones — are the proper venue for deportation orders to be challenged.

But Goldsmith rejected that assertion.

“In these singular circumstances, a federal district court is armed with the jurisdiction to act as a first responder,” he wrote, adding that the court can “assure that those who might be subjected to grave harm and possible death are not cast out of this country before having their day in court.”