ABC News July 24, 2018

Federal judge orders release of Ecuadorean man detained after delivering pizza to military base

WATCH: Federal judge orders release of Ecuadorian man detained after delivering pizza

A federal judge has ordered the release of an Ecuadorean man who was arrested and held for deportation after delivering pizza to an army base in New York City, court documents show.

Federal Judge Paul Crotty, who presides over the Southern District of New York, ordered the immediate release of Pablo Villavicencio on Tuesday, saying that the release was necessary because his imminent removal from the U.S. was no longer reasonably foreseeable, according to the order.

Villavicencio was detained on June 1 after a confrontation happened between him and officials at the Fort Hamilton Military Base in Brooklyn, Brooklyn councilman Justin Brannan told ABC News after the arrest.

(MORE: Man delivers pizza to a military base and was turned in to immigration officials)

On June 9, federal Judge Alison Nathan, also of the Southern District of New York, issued an emergency stay of deportation for Villavicencio and ordered immigration officials to not remove him from the New York City area while he remained in their custody. The stay was in effect until Friday.

Villavicencio was being held at a detention center in New Jersey since his arrest.

Julio Cortez/AP
Pablo Villavicencio, center, is helped into an SUV, where his wife, Sandra Chica, right, and their daughters await after he was released from the Hudson County Correctional Facility, July 24, 2018, in Kearny, N.J.

In Tuesday's order, Crotty said Villavicencio can remain in the U.S. while he exhausts his right to attempt to gain legal status. Although he had agreed at an immigration proceeding in March 2010 to leave the U.S. by July 15 of that year, he "continued to reside in this country," Crotty wrote.

Villavicencio, who is from Ecuador, applied to stay in the country after marrying a U.S. citizen, The Associated Press reported. The couple has two young daughters together.

"Although he stayed in the United States unlawfully and is currently subject to final order of removal, he has otherwise been a model citizen," the court document reads. "He now has two children, both of whom are United States citizens. He has no criminal history. He has paid his taxes. And he has worked diligently to provide for his family."

WABC
Pablo Villavicencio was detained by ICE last week after trying to deliver a pizza on the Fort Hamilton military base in Brooklyn

The day Villavicencio was arrested wasn't the first time he had delivered pizza to the base, Brannan said.

"In the past, he had entered the base with his New York City ID," Brannan said.

After arriving, Villavicencio was directed to the base's Visitor Control Center to obtain a daily pass and signed a waiver permitting a background check, according to a statement the base released after his arrest. Officials were then notified that an active ICE warrant was on his file, and he was subsequently turned over to ICE authorities, the statement read.

Julio Cortez/AP
Pablo Villavicencio leans out of an SUV while talking to reporters after being released from the Hudson County Correctional Facility, July 24, 2018, in Kearny, N.J.

The Legal Aid Society, which has been representing Villavicencio, said in a statement that "the rule of law, humanity and morality prevailed tonight with the court's order releasing Pablo back to his family and community."

"This decision should serve as a rebuke against the Trump administration and its merciless crusade to tear families apart," Adriene Holder, attorney-in-charge of civil practice at The Legal Aid Society, said in a statement to ABC News.

The order is also "an affirmation that the courts can still serve as a check on the executive when it breaks with our laws and principles," Holder said.

Spencer Platt/Getty Images, FILE
Military police enter the Fort Hamilton military base in Brooklyn, June 7, 2018, in New York City. Delivery man Pablo Villavicencio, 35, arrived at the Fort Hamilton base last week to deliver a pizza and after showing his New York City identification card to the guard, immigration agents were called. Villavicencio, an undocumented immigrant from Ecuador and father of two children, was arrested and could be deported back to Ecuador.

"The Villavicencio family has finally received a crucial measure of relief from their 53-day nightmare and we will continue to fight alongside them to protect their right to remain in the community they call home," Holder said.

(MORE: Pizza delivery man detained by ICE wins stay of deportation)

The Legal Aid Society provides legal assistance to "those who suffer in silence, face oppression and struggle to access justice because of poverty," according to its website.

WABC
Pablo Villavicencio was detained by ICE last week after trying to deliver a pizza on the Fort Hamilton military base in Brooklyn

The organization plans on working with Villavicencio toward securing a valid status.

ABC News' Josiah Bates contributed to this report.