CORPUS CHRISTI, Texas – Immigration authorities released an 18-year-old American citizen late Tuesday who had been kept in federal custody for nearly a month after he and his brother were detained at a U.S. Customs and Border Protection checkpoint while en route from their home in South Texas to a soccer camp west of Fort Worth.

The release came well after his lawyer presented federal authorities with the birth certificate that proves his U.S. citizenship, The Associated Press reported.

The Dallas Morning News first reported that Francisco Erwin Galicia, 18, and his 17-year-old brother Marlon Galicia were detained June 27 at the checkpoint in Falfurrias about 80 miles from the Rio Grande. Marlon, who is not a U.S. citizen, agreed to be deported, but Francisco was held, attorney Claudia Galan of McAllen told the newspaper.

Francisco Galicia was carrying a state-issued ID, which can only be obtained by producing a Social Security number and is only available to American citizens.

Immigration debate:Trump campaign again draws Mollie Tibbetts' name into debate despite family's objections

“I presented them with his original birth certificate and other documents and they ignored them," Galan told the Morning News. "So now I’ve faxed over all the documents to the ICE agent handling the case.

"He’s going on a full month of being wrongfully detained. He’s a U.S. citizen and he needs to be released now.”

Representatives of the U.S. Department of Homeland Security and U.S. Customs and Border Protection did not immediately respond to emails seeking comment.

The Morning News report caught the attention of U.S. Rep. Alexandria Ocasio-Cortez, D-N.Y., who tweeted that federal authorities were "detaining American citizens."

"How would you feel trapped in a border camp, where guards wear face masks because the human odor is so strong?" Ocasio-Cortez said in her tweet. "When we allow the rights of some to be violated, the rights of all are not far behind."

Galicia was released from the South Texas Detention Complex in Pearsall, about 240 miles north of McAllen

“I’m so thankful Francisco is free and he can sleep at home tonight and see his mom,” Galan said in the AP report.

Until Saturday, neither she nor Galicia's family were aware of the teen's whereabouts. He was not permitted to call his mother, she said in published reports.

Galan said Galicia did provide Border Patrol agents a wallet-sized birth certificate indicating he was born in Dallas. But he also had a Mexican tourist's visa, which also suggested he was a citizen of Mexico, she said.

“At the time that his mother registered his birth certificate, she used a fake name," Galan told the McAllen Monitor. "Because of that name on the birth certificate, she could never get him a passport, and she never corrected the birth certificate to get him a passport. Instead of doing that, she thought it would be easier to get him a tourist Visa listing him as being born in Mexico."

John C. Moritz covers Texas government and politics for the USA Today Network in Austin. Follow him on Twitter @JohnnieMo.