Mr. Galicia had traveled through the Falfurrias checkpoint in the past and was not expecting any trouble, Ms. Galan said. Nevertheless, as many Hispanics do, he had brought with him numerous documents, including a birth certificate that showed he was born at a hospital in Dallas on Dec. 24, 2000; his state ID, issued in January by the Texas Department of Public Safety; and his Social Security card. Ms. Galan supplied The New York Times with copies of these documents; the birth certificate features stamps from both the State of Texas and the City of Dallas Bureau of Vital Statistics.

Mr. Galicia does not have a driver’s license, Ms. Galan said.

“Border Patrol agents were telling Francisco that his birth certificate was fake, that he was Mexican,” she said.

One of the issues that may have aroused the agents’ suspicions was the presence of Mr. Galicia’s younger brother, Marlon Galicia, 17, who was born in Mexico and has been living in the United States illegally. He had only a school ID, Ms. Galan said. The driver of the vehicle, one of Mr. Galicia’s classmates, is also a United States citizen, Ms. Galan said.

Another issue that could have confused the agents and has complicated his case involved one of Mr. Galicia’s documents. He brought with him a tourist visa issued by Mexico that stated that he had been born in that country, his lawyer said.

Mr. Galicia’s mother, Sanjuana Galicia Chapa, is an undocumented Mexican immigrant who lives in Edinburg. When Mr. Galicia was born, she did not put her real name on his birth certificate because of her immigration status, and she never corrected it. Because of that, she never went through the process of getting her son a United States passport. She believed the best way for him to travel back and forth from Texas to Mexico was to get him the Mexican tourist visa, Ms. Galan said.

“She never fixed that name on his birth certificate, so she never got him a passport and thought it was just easier to get him a tourist visa to get him in and out of the country,” Ms. Galan said.

Marlon Galicia was also briefly detained but later signed documents agreeing to effectively self-deport, and is now living with relatives in Reynosa, Mexico, across the border from McAllen.