Food delivery. Sanctuary. Those are often the anchors for the more than half a million undocumented immigrants who live and work in New York City.

But an incident at the United States Army base in Fort Hamilton, Brooklyn, last week has called those foundations into question, and provoked new tension in the city’s battle with federal immigration authorities over protections for immigrants without legal status.

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.