Federal authorities also must field a work force that by design reflects the heavily Hispanic communities across the Southwest they are expected to police. Agents sometimes have relatives, friends and neighbors whom they know or suspect are undocumented. In South Texas, one of the most heavily traveled migrant corridors in the country, Border Patrol agents or their spouses have sometimes hired undocumented housekeepers, as do many of their neighbors.

Mr. De La Garza’s deception was unusual for Customs and Border Protection, the largest law enforcement agency in the country, with nearly twice the staff of the F.B.I. Yet it was not unprecedented. There have been at least three other cases of undocumented people working as Customs officers or Border Patrol agents who were prosecuted in federal court in recent years.

One of those cases involved Oscar Antonio Ortiz, a Border Patrol agent in the San Diego area, who first applied for work in the weeks after the terror attacks of Sept. 11, 2001. Like Mr. De La Garza, Mr. Ortiz was a Mexican citizen with a fraudulent birth certificate who had also served in the Navy. But once he was hired by Border Patrol, Mr. Ortiz got involved, along with another agent, in human smuggling: transporting migrants for money into the United States, sometimes in their Border Patrol vehicles, according to court documents. Mr. Ortiz, who had been assigned to the Border Patrol station in El Cajon, Calif., was sentenced in 2006 to five years in prison.

Mr. Ortiz was later deported and now lives in Mexico. His lawyer, Stephen P. White, said his client had believed, like Mr. De La Garza, that he was born in the United States, based on what his parents told him and the fraudulent birth certificate they had provided him.

Image A photo of Marco De La Garza submitted as part of a court filing.

“He got security clearances, background checks multiple times and was as surprised as anybody else to find out that he wasn’t a U.S. citizen when he got arrested on the alien smuggling charge,” Mr. White said.

Mr. De La Garza worked at the port of entry in Douglas, Ariz., about 120 miles southeast of Tucson. He lived with his wife and children about 40 miles west of Douglas in the town of Hereford, and appeared to relish his job, filling his home with mugs, clocks and other trinkets bearing Customs or Navy logos.