(CNN) US immigration officials defended the detention of a high school student born in the US who was held behind bars for three weeks, saying Wednesday the teen provided conflicting reports regarding his citizenship status.

Francisco Galicia, 18, was released Tuesday after word spread about the case following a report by the Dallas Morning News on Monday. Immigrant rights advocates pointed to the case as a sign that US immigration authorities are going too far as they crack down on illegal immigration.

"This individual provided conflicting reports regarding status of citizenship after being apprehended by U.S. Border Patrol and transferred into Immigration and Customs Enforcement Custody," US Customs and Border Protection and Immigration and Customs Enforcement said in a joint statement Wednesday.

Claudia Galan, an attorney representing Galicia, said border patrol officers held onto the teen's identity documents after his release and she's not sure why.

The CBP and ICE statement appeared to indicate they are still "researching the facts" of the case.

"Situations including conflicting reports from the individual and multiple birth certificates can, and should, take more time to verify. While we continue to research the facts of the situation, the individual has been released from ICE custody. Both CBP and ICE are committed to the fair treatment of migrants in our custody and continue to take appropriate steps to verify all facts of this situation," the statement said.

How the incident unfolded

It all started when Galicia was on his way to a college soccer scouting event on June 27.

He was traveling with his 17-year-old brother Marlon and a group of friends from their hometown of Edinburg to Houston when they came upon a CBP checkpoint in Falfurrias, about 100 miles north of the US-Mexico border

Francisco Galicia was traveling to Houston when he was detained at a CBP checkpoint.

Both brothers were detained, and Marlon, who does not have legal status in the US, was returned to Mexico, Galan said.

Galicia had his Texas state identification, a wallet-sized birth certificate and his social security card, Galan said.

He also had a Mexican tourist visa with him that inaccurately lists his country of birth as Mexico, setting up a conflicting nationality claim, Galan said.

Nevertheless, "despite his tourist visa, he was born here in the US and he's a natural born US Citizen," she said.

It's not unusual for immigration officials to scrutinize citizenship claims, said Cesar Garcia Hernandez, an associate professor of law at the University of Denver who is not affiliated with the case. The Mexican tourist visa may have caused officials to be skeptical of the legitimacy of his identification documents, including his birth certificate.

But Galicia's case should have been easy to resolve by confirming his citizenship, Galan said. That he was detained for this long shows that Homeland Security is "overwhelmed" to the point of being unable to give each case the attention it needs, she said.

What his identity documents said

Galicia's mother obtained a Mexican tourist visa for him so he could visit family in Mexico, the lawyer explained. Because she lives in the United States illegally, she did not want her real name on Galicia's birth certificate, so she used a false name for herself, Galan said.

"And because of that she was not able to get him a passport. She never corrected his birth certificate and just thought it was easier to get him a tourist visa so he could get in and out of the country," Galan explained.

But when his mother applied for his tourist visa, she listed him as being born in Mexico. "And that brings a conflicting claim on his US citizenship," Galan said.

However, Galan said she presented CBP with documentation proving Francisco's citizenship about two weeks ago. The documents, which she shared with CNN, include a birth certificate that lists Galicia's place of birth as Parkland Memorial hospital in Dallas; a health insurance card; a Texas Temporary Identification Card and high school photo identification. CNN cannot independently verify their authenticity.

Francisco Galicia, left, was born and raised in Texas, his lawyer said,

Despite providing the documentation, Galan said Galicia was transferred on Saturday to ICE custody for removal proceedings. He was held in the South Texas Detention Complex in Pearsall until his release on Tuesday.

No apology from authorities

Galan told CNN Tuesday night that although her client had been released, ICE and Border Patrol representatives had not acknowledged that Galicia's detainment should never have happened.

The attorney told CNN that Galicia was happy to be out of detention but suffered through the "worst condition" while in the custody of Border Patrol.

According to Galan, Galicia said he was held in a small room with about 60 other people, only one toilet and no doors or wall. She says her client was hungry all the time and would sleep just to forget about his hunger.

Galan said that the teen lost a lot of weight while in Border Patrol custody, but that conditions were a little better when he was transferred to an ICE facility.

US citizens have been detained by immigration authorities before

Galicia isn't the only US citizen who's been detained by US immigration authorities.

In December, 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.

Jilmar Ramos-Gomez , a Marine veteran who was born and raised in Michigan, spent several days in ICE custody.

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

Matthew Albence, now ICE's acting director, 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 last year, and agents arrest only those they have probable cause to suspect are eligible for deportation.