He delivered pizza to an Army base in Brooklyn. Now he faces deportation.

Pablo Villavicencio Calderon, 35, an undocumented immigrant, was making a delivery from a brick-oven pizza restaurant in Queens to the Army base next to the Verrazano-Narrows Bridge on Friday before lunchtime.

According to his wife, Sandra Chica, he presented a New York City identification card, as he had done in the past. The card, provided through a program called IDNYC, was supposed to give undocumented immigrants a method of proving their identification when dealing with city agencies, including the schools system and the Police Department, neither of which is allowed to ask about immigration status.

But on that day, Ms. Chica said, it was not enough for the military police officer on duty, who said Mr. Villavicencio needed a driver’s license, which he did not have. A background check revealed an open order of deportation from 2010. Military personnel detained him and called Immigration and Customs Enforcement officers, who took him into custody, an official for the immigration agency said.