Francisco Erwin Galicia, 18, a US citizen, was falsely detained after Customs and Border Protection officers didn't believe his Texas state legal documents were real.

He was released on Tuesday after a total of 23 days in detention in CBP and Immigration and Customs Enforcement facilities.

He described "inhumane" conditions at the CBP facility to The Dallas Morning News, saying he wasn't allowed to shower and was given so little food that he lost 26 pounds.

Visit INSIDER's homepage for more stories.

Francisco Erwin Galicia, the US citizen mistakenly detained by border officials for over three weeks, told The Dallas Morning News on Wednesday that conditions in federal custody were so bad that he almost requested to be deported.

Galicia, 18, a high-school student born in Dallas, was detained after a day out with friends on June 27 when officials at a Customs and Border Protection checkpoint questioned the validity of his legal documents, according to The News.

Galicia leaving the South Texas Detention Facility. Kin Man Hui/The San Antonio Express-News via AP

CBP detained him for about three weeks, then transferred him to an Immigration and Customs Enforcement facility in Pearsall, Texas, the newspaper reported.

He was in the ICE facility from Saturday to Tuesday afternoon, when he was released, The News and The Associated Press reported.

In total, he spent 23 days in federal custody.

Broadly, CBP conducts inspections at the border and detects unauthorized entries into the US, while ICE enforces US immigration laws, including arresting, detaining, and deporting people, at the border and inside the US.

Read more: An 18-year-old US citizen born in Texas was released from federal immigration custody after being detained for almost a month

Inside a Customs and Border Protection facility in McAllen, Texas, in June 2018. Customs and Border Protection via Associated Press

'Inhumane' conditions

Galicia has described the conditions in CBP detention as "inhumane." Here's what he told The News on Wednesday:

He was given insufficient food, losing 26 pounds during his detention.

He wasn't allowed to shower, leaving his skin dry and dirty. (It's not clear if he wasn't allowed to shower at all or permitted to shower only a few times.)

He was crammed into an overcrowded holding area with 60 other men.

They slept on the floor and were given only aluminum-foil blankets as cover.

Some men slept on the bathroom floor.

Some were bitten by ticks, and some were very sick. But many were afraid to ask to see a doctor because CBP officers said that if they did their detention at the facility would restart.

He said he was also denied access to a phone while in CBP custody, so he couldn't call his family, his mother told The News. He regained that access after being transferred to the ICE facility, she said.

"It was inhumane how they treated us," Galicia told the newspaper on Wednesday.

"It got to the point where I was ready to sign a deportation paper just to not be suffering there anymore. I just needed to get out of there," he said.

"It's one thing to see these conditions on TV and in the news. It's another to go through them."

Neither CBP nor ICE immediately responded to requests for comment from INSIDER on The News' report.

Galicia leaving the ICE facility in Pearsall on Tuesday. Kin Man Hui/San Antonio Express-News via AP

How an American citizen got detained

Galicia was detained while traveling north with friends to a soccer scouting event from the border city of Edinburg, Texas, according to The News and the AP.

They were due to start their senior year of high school and wanted to "do something to secure our education" after graduation, Galicia told The News.

At the checkpoint, agents approached him, suspecting he was in the US illegally, the AP reported.

Galicia presented them with a Texas birth certificate, a Texas ID, and a Social Security card, his lawyer, Claudia Galan, told The Washington Post. But the officers thought his documents were fake, she said.

Galicia hugs his lawyer, Claudia Galan, after his release on Tuesday. Kin Man Hui/The San Antonio Express-News via AP

'Absolutely' a victim of racial profiling, lawyer says

Galan told the AP that Galicia was "absolutely" a victim of racial profiling, noting that everyone in the car with him at the time was Latino.

It's likely that CBP and ICE took weeks to release Galicia because his mother, who is not a US citizen, took out a US tourist visa in Galicia's name that falsely said he was born in Mexico, Galan told The Post.

Galicia's mother told The Post that she took out the tourist visa while Galicia was still a minor so he could travel between the US and Mexico to visit family.

Read more: ICE officers will soon be able to deport undocumented immigrants in the US for under 2 years without a hearing

A February 2009 photo of the ICE facility where Galicia was detained. Eric Gay/AP

Galicia's 17-year-old brother, Marlon, who was born in Mexico and lacks legal status in the US, was also in the car.

Francisco's detention prompted Marlon's voluntary deportation to Mexico within two days, The News reported.

CBP and ICE told The News in a joint statement on Wednesday that "situations including conflicting reports from the individual and multiple birth certificates can, and should, take more time to verify," adding that they "continue to research the facts of the situation."