(CNN) He's a US citizen who was born and raised in Michigan.

He's a Marine veteran who served in Afghanistan.

And last month, he spent several days in Immigration and Customs Enforcement custody.

Now, Jilmar Ramos-Gomez's family and immigrant rights groups say officials owe them an explanation.

"The fact that he has the name that he does, that he's of the ethnic background that he is, almost certainly played a role," said Miriam Aukerman, a senior staff attorney with the ACLU of Michigan.

Advocates say the 27-year-old's case shows the peril of what can happen when local authorities too readily cooperate with ICE.

ICE said Ramos-Gomez himself told ICE officers who interviewed him that he was a foreign national living illegally in the United States.

"ICE officers worked in good faith with the information they had available at the time," the agency said in a statement released to CNN affiliate WOOD-TV

Mother: 'They don't care what he did for his country'

Ramos-Gomez was eventually released after three days in ICE custody.

But the veteran's mother told reporters Wednesday that she was still reeling from the experience.

"I almost had a heart attack when I found out that my son was in Immigration's hands. They don't care what he did for his country," Maria Gomez said. "That makes me mad."

Maria Gomez's son, Jilmar Ramos-Gomez, was held for three days for possible deportation after pleading guilty to a disturbance at a western Michigan hospital.

Ramos-Gomez served in the Marines from October 2011 to August 2014, according to military records. The lance corporal and tank crewman was awarded numerous medals for his service.

But he returned home "a shell of his former self" and suffers from post-traumatic stress disorder, the ACLU said Wednesday.

"He has episodes where he disappears," the ACLU said, "and when he is found again he often has no recollection of where he has been."

That's what happened in November, according to the ACLU, when local authorities in Grand Rapids, Michigan, arrested Ramos-Gomez after he allegedly set a small fire at a hospital, pulled a fire alarm and ended up on the hospital's helipad.

He pleaded guilty to a misdemeanor trespassing charge and a judge had ordered him to be released on his own recognizance, according to his attorney. But instead of releasing him from jail, advocates said, local authorities handed him over to ICE.

JUST WATCHED Deported US military veterans live in limbo Replay More Videos ... MUST WATCH Deported US military veterans live in limbo 04:02

Kent County Undersheriff Chuck DeWitt told WOOD that his department's contract with ICE meant authorities had to tell the federal agency when Ramos-Gomez was about to be released.

Ramos-Gomez had "claimed in verbal statements to be a foreign national illegally present in the US," ICE said in a statement released through the sheriff's office. "Based on his statements, ICE lodged a detainer with local authorities."

But immigration attorney Richard Kessler told The Washington Post that ICE's account didn't provide enough of an explanation.

"I think it's racial stereotyping," Kessler said. "And it should have been evident that he had pretty significant mental-health issues."

Advocates: We warned this would happen

Immigrant rights groups said the case highlights what they were afraid would happen when local authorities signed an agreement to cooperate with ICE.

"This is precisely the type of incident that we warned would happen," attorney Hillary Scholten of the Michigan Immigrant Rights Center told reporters. "And unfortunately, now it has."

The ACLU is calling for officials in Kent County, Michigan, to investigate the case -- and to put an end to their close ties with ICE.

"Research has shown conclusively that local law enforcement's collaboration with ICE increases instances of racial profiling, and sows distrust between the community and law enforcement," advocates said in a letter. "This voluntary practice can be stopped at any time. The time to do so is now."

ICE has said it issues detainer requests to local law enforcement agencies to protect public safety and carry out its mission

Ramos-Gomez isn't the only US citizen who's ended up in ICE custody.

Last month, the ACLU and Southern Poverty Law Center filed a lawsuit over the detention of Peter Sean Brown, a US citizen who was born in Philadelphia and ended up in ICE detention in Florida.

An investigation by the Los Angeles Times last year found that ICE had released more than 1,400 people from custody since 2012 after investigating citizenship claims.

Matthew Albence, a top ICE official, told the newspaper that the agency takes any assertions that a detained individual may be a US citizen very seriously.

ICE updates records when errors are found, Albence said in a statement to the Times, and agents arrest only those they have probable cause to suspect are eligible for deportation.