A U.S. Border Patrol chief on Thursday testified before the House Judiciary Committee that 18-year-old Francisco Erwin Galicia never claimed to be a U.S. citizen when he was in Border Patrol custody for 23 days.

But that contradicts a notice to appear in immigration court served to Galicia in which the Department of Homeland Security accused him of falsely claiming to be a U.S. citizen while in custody.

Galicia is a Dallas-born U.S. citizen who lives in Edinburg in Texas' Rio Grande Valley. He also says he has dual citizenship in Mexico. The story of his 26 days in detention after being picked up by the Border Patrol in Falfurrias garnered widespread national attention after The Dallas Morning News first reported it on Monday.

At a House Judiciary Committee oversight hearing, Brian Hastings, Chief of Law Enforcement at the U.S. Border Patrol, also said that Galicia was detained because it was discovered he had used a U.S. visitors visa that his mother got for him when he was a minor to travel back and forth from Mexico more than 50 times.

During the oversight hearing on family separations and short-term custody, Rep. Ted Lieu, D-California, asked Hastings why Galicia was held in custody for more than three weeks.

Galicia was released less than 24 hours after The News broke the story.

Lieu, citing The News' reporting in which Galicia said that he lost 26 pounds in 23 days and wasn't allowed a shower during that time, asked Hastings if he could explain why Galicia was detained.

Hastings replied that at the Falfurrias checkpoint where Galicia and his younger brother Marlon Galicia were taken into custody, Francisco “claimed to be a Mexican National who was born in Reynosa, Mexico.”

“Throughout the process, and while he was with Border Patrol, he claimed to be a citizen of Mexico with no immigration documents to be in or remain in the U.S.,” Hastings told the members of Congress.

“Upon further investigation we also found that he had a border crossing card and that border crossing card he had used 53 times to cross the border into the U.S., which gives us further indication that he was not a U.S. citizen. At no time in Border Patrol custody did he say that he was a U.S. citizen.”

But Claudia Galan, Galicia's attorney, produced for The News a notice to appear that DHS issued to Francisco that reads:

“On or about June 27, 2019, you were found at the Falfurrias, Texas, Border Patrol Checkpoint, a distance of more than 25 miles from the United States border with Mexico ... You did not receive the permission of an immigration officer to proceed beyond that 25 mile limit ... At that time, you falsely represented yourself to be a citizen of the United States for the purpose of furthering your entry into the United States.”

Galan said Galicia told authorities that he is a U.S. citizen from the moment he was detained at the Falfurrias checkpoint.

“[Hastings’] statement is incorrect,” Galan said Thursday. “At the moment he was stopped, he showed them his documents and he kept saying he was a U.S. citizen.”

After The News sought comment on Hastings' testimony, a CBP spokesman responded said that the agency had nothing further to provide in regard to Galicia's case.

Galicia was carrying a Texas ID, wallet-sized birth certificate and Social Security card when detained by Border Patrol authorities. Galan also presented ICE officials with a short-form copy of his birth certificate, proving his citizenship, about two weeks later.

It was another week before Galicia was released.

Galicia was detained June 27 at a CBP checkpoint in Falfurrias. He was traveling with his brother Marlon Galicia and three other friends. They were traveling to Ranger College in North Texas for a soccer scouting event.

Francisco Galicia embraces his mother, Sanjuana Galicia, on Wednesday in McAllen. Galicia, 18, who was born in the U.S., was released on Tuesday from federal immigration custody after wrongfully being detained for more than three weeks. (Delcia Lopez / The Associated Press)

The group was pulled over by CBP officers, and they were asked about their statuses. Marlon and another passenger lacked legal status to be in the U.S.

Francisco said he told CBP officers that he was a U.S. citizen and presented them with his documents.

They detained him, Marlon Galicia and another passenger. Two days later, Marlon Galicia self-deported so that he could tell his mother what was happening with his situation and that of his brother.

Francisco Galicia told The News Wednesday that agents doubted the validity of his documents from the beginning.

He was taken to a Falfurrias CBP holding facility, where he spent 23 days in conditions which he said were so poor that he almost opted to self-deport.

“It was inhumane how they treated us. 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 Wednesday.

Galan said the confusion over Galicia's citizenship status came from a visitors visa that Galicia’s mother, Sanjuana Galicia, solicited for him when he was a minor so that he could easily travel back and cross the border without a passport. Sanjuana used a fake ID when she lived Dallas. When she gave birth to Francisco, hospital staff used the name on the fake ID on his birth certificate.

She feared she would be unable to get Francisco a U.S. passport, so after she moved to Reynosa, she solicited the visitor's visa for him. It was there that she gave birth to her son Marlon Galicia before eventually bringing the family to the U.S.

Asked Thursday about Hastings’ testimony before the House committee, Francisco Galicia said, “How can they say that? That’s a lie. I showed them my documents and I told them right away that I was a U.S. citizen.”