A Muslim man can proceed with his lawsuit alleging he was subjected to low-grade torture when U.S. Customs agents detained him at the border, a judge has ruled.

Government lawyers had asked the judge to toss out the lawsuit filed by Anas Elhady, a naturalized U.S. citizen from Dearborn, Michigan.

Elhady sued over his 2015 detention at the Ambassador Bridge border crossing into Detroit. He says he was put in a freezing holding cell for hours, causing him to shake uncontrollably and his lips to turn blue. He was eventually taken to a hospital for treatment.

Elhady, who was born in Yemen, says he has wrongly been placed on the government's terrorist watchlist and harassed as a result when he attempts to travel.

Government lawyers wanted the case dismissed partly because they said it could require delving into national-security issues.

But the judge's ruling, issued Friday, said the government can't invoke national security to excuse misconduct.

The government lawyers "do not even attempt to describe how this case implicates national security, but rather claim 'national security' in the hope that the Court will look no further," U.S. District Judge Mark Goldsmith wrote. "But there is no plausible national-security interest in placing a person in a room so cold that he develops hypothermia within a matter of hours, and Defendants' refusal to offer any kind of explanation speaks volumes."

The government also argued that mere exposure to cold over a short period of time is an insufficient basis for someone to claim cruel treatment under the Constitution. But Goldsmith noted that Elhady's claims include allegations that he suffered from hypothermia and agents deliberately reduced the temperature in the cell, and that such circumstances could be considered unconstitutionally cruel treatment.

Elhady is also a plaintiff in a separate lawsuit in Alexandria, Virginia, challenging the constitutionality of the government's watchlist. In that case, the government recently acknowledged that hundreds of private entities receive access to the government's list, despite years of denials that the list is shared with private groups.

In both cases, Elhady is represented by the Council on American-Islamic Relations, a Muslim civil rights group.