BOSTON (AP) — Lawyers in Massachusetts are seeking the release of a man they say is being unlawfully detained by federal immigration officials while they try to find a country to deport him to.

The case involves Sreynuon Lunn, 32, who was born in a Thai refugee camp to Cambodian parents fleeing the Khmer Rouge and brought to the United States as a seven-month-old child. Lunn was legally allowed into the country as a refugee and given lawful permanent resident status.

Last October, Lunn was charged with unarmed robbery and held until February for a trial date. The charges were ultimately dismissed, but the court ordered Lunn held on a so-called Immigration and Customs Enforcement detainer request, overruling a request by his lawyers that he be released.

Immigration agents arrived several hours after the charges were dismissed to take Lunn into custody.

Detainer requests typically ask federal, state, local and tribal law enforcement agencies to give at least 48 hours’ notice before an individual is released from a jail — or to hold the person for up to 48 hours after they would normally be released.

Lawyers for Lunn last month argued before the Massachusetts Supreme Judicial Court that the practice of holding individuals on detainer requests violates both the Fourth Amendment of the U.S. Constitution, which bars against unreasonable searches and seizures of individuals, and similar provisions in the Massachusetts Constitution.

The Department of Justice defends the use of detainer requests.

That case is still pending.

On Monday, the American Civil Liberties Union of Massachusetts filed a petition in the U.S. District Court for the District of Massachusetts seeking Lunn’s release.

They say the Department of Homeland Security has designated Cambodia as Lunn’s country of origin even though government officials there have denied Lunn is a Cambodian citizen for nine years and have refused to issue him travel papers. Thai officials have also said they don’t consider Lunn a citizen of Thailand.

“If the government cannot deport Mr. Lunn, it has to let him go,” said Matthew Segal, legal director at the ACLU of Massachusetts.

His attorneys also want the court to order immigration officials not to take Lunn back into custody unless they have a country to deport him to.

Shawn Neudauer, a spokesman with Homeland Security, said ICE “declines comment at this time as the matter is currently pending before the courts.”

It’s not the first time the government has attempted to deport Lunn, who has raised two children born in the United States.

Immigration officials first tried to deport Lunn in 2009 after he was convicted of an aggravated felony.

Lunn’s lawyers said Lunn contacted the Cambodian Embassy in Washington, D.C. multiple times, but embassy personnel told him that they were unwilling to issue the necessary travel documents because Lunn was not a Cambodian citizen.

Homeland Security officials ultimately released him.

The pattern would be repeated two more times, according to court records.

Republican Gov. Charlie Baker last year allowed the state police to temporarily detain some people wanted by federal immigration authorities, reversing a previous policy put in place during the administration of former Democratic Gov. Deval Patrick.

(© Copyright 2017 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)