How did an American citizen, born in Michigan, and decorated veteran who served in Afghanistan, end up in an ICE detention center, flagged for deportation?

That’s what the American Civil Liberties Union and immigration rights groups want to know.

Jilmar Ramos-Gomez, 27, served in Afghanistan from 2011 to 2014, serving as a lance corporal and a tank crewman in the U.S. Marines. According to the ACLU, he received numerous awards, including the national defense service medal, a global war on terrorism service medal, an Afghanistan campaign medal and a combat action ribbon.

When he returned to his hometown in Michigan, the ACLU says, he was a “shell of his former self,” suffering from severe PTSD, and having some episodes where “he disappears, and when he is found again, he often has no recollection of where he has been.”

Ramos-Gomez was jailed in Kent County, Michigan, last November, after he allegedly broke into the heliport area of a hospital, set a fire, and pulled a fire alarm. According to police reports reviewed by the ACLU, Ramos-Gomez had his U.S. passport on his person at the time of his arrest.

He pleaded guilty to trespassing, and a judge ordered his release on a personal recognizance bond three weeks later, meaning he committed to staying out of trouble while his case was pending. But rather than releasing him, Kent County deputies held him until ICE agents could pick him up. The deputies reportedly believed was in the country illegally, but it's not clear yet why, and that's a key question in the case.

Kent County Undersheriff Chuck DeWitt told the Associated Press that they were holding Ramos-Gomez at ICE's request. "Once he was released from our custody, he was under the domain of ICE," DeWitt told AP. "Where they take him is their process."

When Gomez-Ramos' mother, Maria Gomez, an immigrant from Guatemala, came to collect him from jail, she was told he’d been transferred to an immigration detention center in Calhoun County, nearly 100 miles away.

"I almost had a heart attack when I heard that my son was in immigration's hands," Gomez told a local NBC affiliate Wednesday. "They don't care what he did for his country. That makes me mad."

At the time, Gomez was working with an immigration lawyer to secure temporary residency for herself under allowances afforded to parents of servicemembers, which meant her lawyer had all of Ramos-Gomez’s residency documents available. “I immediately called ICE and shouted at them,” lawyer Richard Kessler told the Washington Post. “And they called me back and said, kind of, ‘Oops, yeah, come and get him.’ They didn’t say, ‘Our bad,’ but kind of implied that.”

It took three days for them to secure his release from ICE custody.

“The sheriff’s department worked with ICE agents to enable his transfer to an immigration detention center in Calhoun County to start the deportation process,” ACLU said in a statement. “It is unclear how that was possible or why the jail believed it should hand Mr. Ramos-Gomez over to ICE rather than release him as required by the court order.”

An ICE official, Vincent Picard, told the local NBC outlet that Ramos-Gomez repeatedly insisted he was in the country illegally. “Officers acted in good faith with the information they had available at the time,” Picard said.

Rather than respond to VICE News’ request for comment, ICE forwarded a series of automatic responses saying they are prohibited by law from responding to media queries due to the ongoing federal government shutdown.

What happened to Ramos-Gomez wasn’t the first time that an American citizen has been flagged for deportation under the Trump administration. Last April, a Philly native found himself ensnared by ICE after he tested positive for marijuana in violation of his probation agreement. During routine booking into Monroe County Jail, Florida, his identity was mistakenly matched in a centralized database shared with ICE with that of an undocumented immigrant from Jamaica.