Discuss as:

US citizen sues federal government after being wrongly flagged as deportable immigrant under Secure Communities program

A 25-year old Illinois man who says he was wrongly held in a maximum-security prison for two months after being incorrectly flagged by a controversial fingerprint-sharing system as a deportable immigrant is suing the federal government.

James Aziz Makowski, who was born in India but has been a U.S. citizen since he was 1 year old, says he wound up in prison instead of boot camp as punishment for a drug crime, all due to errors in the government's fingerprint data-sharing system.

“It was one of the most sad and hopeless periods of times I’ve ever had,” he told msnbc.com on Tuesday.

Makowski, a former Marine who now works as a network engineer in downtown Chicago, is seeking unspecified damages from the Justice Department and the Department of Homeland Security for, among other things, emotional distress and lost wages.

Makowski’s lawyers, Geoffrey Vance of McDermott Will & Emery and Mark Fleming, with the Chicago-based National Immigrant Justice Center, say the lawsuit, filed last week in U.S. District Court in Chicago, is the first to challenge the federal government’s controversial Secure Communities program.

Under the initiative, started by the Bush administration in 2008 and expanded to thousands of jurisdictions across the country under the Obama administration, federal agencies help local law enforcement identify and deport  illegal immigrants who have committed crimes, mainly though a fingerprint-sharing system.

Many social-justice and immigrant-rights advocates contend that the program is riddled with the potential for mistakes and that thousands of people who have no criminal records have been expelled.

Read the full complaint (.PDF)

According to court documents:

Makowski was born in Calcutta, India, and adopted by American parents when he was 1. He was issued a U.S. citizenship certificate in March 1989 and has been living continuously in the U.S. since then, leaving the country only once for a family vacation to England.

On July 7, 2010, Makowski was arrested in DuPage County, Ill., for selling heroin. He pleaded guilty to the felony charge in December 2010 and was sentenced to seven years in prison, but the judge said he could be released on parole if he successfully completed a 120-day “boot camp” drug-rehabilitation program.

After sentencing, Makowski was transferred to the Stateville Correctional Center in Illinois for processing into the boot camp. But he was disqualified from the program after his name was flagged in a database and authorities issued a federal immigration detainer, even though he told an Immigration and Customs Enforcement agent he was a U.S. citizen and showed his U.S. passport.

Instead of entering the boot camp, Makowski was sent to a maximum-security prison in Pontiac, Ill., where he spent two months until a lawyer hired by his father managed to convince the ICE office in Chicago to cancel the immigration hold. Makowski then completed the 120-day boot camp and was released in July 2011.

“I was in a maximum-security prison and I didn’t know why I was there other than the immigration detainer,” Makowski said in a telephone interview. “I just felt completely hopeless. I only ate once a day and stared at the ceiling all day. I stayed in my room 99 percent of time.”

Watch the most-viewed videos on msnbc.com

Fleming, the attorney, said Makowski’s nightmare occurred because Homeland Security apparently never updated its records to reflect that Makowski is a U.S. citizen. He said the FBI’s practice of sharing fingerprints of U.S. citizens with ICE officials as part of the Secure Communities program violates federal privacy laws.

“The lesson to be learned is that there are certain U.S. citizens who are particularly vulnerable to being ensnared in this program. The federal government, in the interest of efficiency, has done short shrift to checks and balances,” Fleming said.

Amber Cargile, a spokeswoman for ICE, said the agency does not comment on pending litigation.

“To date, Secure Communities has helped ICE remove more than 147,400 convicted criminal aliens including more than 54,200 convicted of major violent offenses like murder, rape and the sexual abuse of children. Approximately 95 percent of the 198,000 removals generated through Secure Communities clearly fell within one of ICE’s enforcement priorities,” she said in a statement.

Cargile also noted that in December, ICE announced a new detainer form and the launch of a 24-hour, toll-free hotline – (855) 448-6903 – that detained individuals can call if they believe they are U.S. citizens or victims of a crime.

Makowski said he’s “confused and a little bit angry” at the government over his detention. 

“I’m just hoping this lawsuit will help bring about change in the system,” he said. “Luckily my family had resources available … to help out, but I know there are plenty of individuals who don’t have those resources.”

More content from msnbc.com and NBC News:

Follow US News on msnbc.com on Twitter and Facebook