San Bernardino resident Guadalupe Plascencia, an American citizen who last year was mistakenly detained as an unauthorized immigrant and threatened with deportation, will receive a $55,000 settlement.

San Bernardino County will pay Plascencia $35,000 and the federal government will pay her $20,000 under an agreement to dismiss her lawsuit in U.S. District Court in Riverside, the American Civil Liberties Union of Southern California said Friday.

“How could it be, in the 21st century, that these types of errors can exist?” Plascencia said in Spanish when reached by phone Friday afternoon. Throughout her detention, she said, she repeatedly told authorities she’s a U.S. citizen.

The Sheriff’s Department issued a statement late Friday blaming a computer error for generating a notification that Plascencia was a suspected unauthorized immigrant, which led to notifying immigration authorities. “Our deputies do not and will not enforce immigration laws,” a Sheriff’s spokeswoman said in the statement.

Meanwhile, a San Bernardino County spokesman said the county does not comment on Sheriff’s Department matters.

Plascencia is not the first U.S. citizen wrongfully picked up by immigration agents.

There have been hundreds of cases if not thousands, according to some researchers.

Between fiscal years 2008 and 2012, 834 U.S. citizens and 28,489 legal permanent residents were detained by U.S. Immigration and Customs Enforcement (ICE) agents, according to the Transactional Records Access Clearinghouse, or TRAC, a research center at Syracuse University.

A 2016 analysis published by National Public Radio, with data from Northwestern University Professor Jacqueline Stevens, found that 693 American citizens were held in local jails at the request of immigration officials and another 818 were in immigration detention centers from 2007 through July 2015.

One local citizen who found himself in that kind of jam was Rialto resident Sergio Carrillo. In 2016, the San Bernardino County man was arrested while shopping in a Home Depot and held in an immigration detention for three days. Last November, federal officials paid out $20,000 to settle his lawsuit.

Overall, San Bernardino had the highest number of ICE arrests in the country from Oct. 2017 through May 2018, according to a report released this week by TRAC, the research center at Syracuse University. San Diego and Los Angeles counties were among the top 10 in the country when it came to ICE arrests, TRAC reported.

Plascencia said she had lived in San Bernardino for some 40 years and been a citizen for nearly two decades when she was taken into custody on March 29, 2017.

Her ordeal began when she went to the Ontario Police Department to collect a gun, which she had lawfully registered, that was in her car during an accident involving her daughter. Upon showing her driver’s license, police arrested her, citing a 10-year-old warrant but giving her no specifics, according to the complaint filed in court. (The warrant, now resolved, was issued after she didn’t appear in court as a witness in another matter, attorneys said.)

The San Bernardino woman, a beautician who co-owns a beauty parlor with her daughter, was taken to the West Valley Detention Center in San Bernardino County, where she spent the night. The next day, Sheriff’s deputies told her to sign a form notifying ICE of her release but, according to the lawsuit, they also stalled her release to give enough time for ICE agents to arrive.

“They basically sneakily prolonged her detention while they were processing her release in order for ICE to show up at the jail the second the doors opened and she was released,” said ACLU attorney Adrienna Wong.

Once ICE agents arrived, they handcuffed her, put a chain around her waist and transferred her to an ICE detention facility. Requests to call her family were denied and she was mocked when she said she was citizen, her attorney said.

“One of the ICE agents laughed at her and said, ‘You’re nobody until we say you’re somebody,” Wong said.

The government relied on faulty databases and failed to access information that was readily available, ACLU officials said.

“We think the government should do its due diligence and establish probable cause and not rely on faulty record systems to arrest somebody,” Wong said.

Plascencia, mother of 5 children and grandmother to 16 grandchildren, was in ICE detention for about an hour and a half after spending the night in jail until her daughter was contacted and arrived with her American passport.

Plascencia said she was traumatized by what happened and is worried for others who are detained by ICE. “That hasn’t ended,” she said.