This is an archived article and the information in the article may be outdated. Please look at the time stamp on the story to see when it was last updated.

BROOKLYN, N.Y. — A father taken into custody by immigration agents while delivering pizza to a Brooklyn Army base  was released Tuesday night following a judge’s order.

Pablo Villavicencio, a citizen of Ecuador, was detained on June 1 while making a pizza delivery at Fort Hamilton.

He presented New York City’s identification card to the guards there, but was asked to show additional identification and was detained after a background check revealed there was a warrant for his arrest for immigration law violations.

He said he had visited military installations before without any problems.

Officials at Fort Hamilton said that Defense Department procedures require civilian visitors to present certain types of identification to get access to the base. New York’s city-issued card, which was initially marketed to the public as a way for unauthorized immigrants to get official identification, is not among the accepted forms of ID.

Though he has no criminal record, Villavicencio did come to the U.S. illegally from Ecuador in 2008.

In 2010, according to ICE, he was granted voluntary departure. He was ordered to leave the country by July of that year. He never did. His wife said they filed a petition challenging that order.

The couple married five years ago and this year Villavicencio applied for his green card. They have two daughters, ages 2 and 4.

His case attracted public attention and is similar to the detention of Concepción and Margarito Silva, who were turned over to ICE while visiting their daughter and son-in-law at Fort Drum, an Army base in upstate New York.

They, too, said they’d visited the military installation before without issue.

Both instances sparked outrage among immigrant rights groups who see it as another example of how the Trump administration’s hardline immigration policies are harming families.

The Associated Press and CNN contributed to this report.