"Although he stayed in the United States unlawfully and is currently subject to a final order of removal, he has otherwise been a model citizen," U.S. District Judge Paul Crotty wrote of Pablo Villavicencio.
The Manhattan judge said Villavicencio, who was being held at a New Jersey lockup, can remain in the United States while he exhausts his right to try to gain legal status. Villavicencio applied to stay in the U.S. after he married a U.S. citizen, with whom he has two young girls.
The judge cited those children and said they are U.S. citizens.
"He has no criminal history," the judge wrote. "He has paid his taxes. And he has worked diligently to provide for his family."
The U.S. government, which had wanted the case moved from New York to New Jersey, did not immediately comment on the judge's action.
Villavicencio walked out of the immigration detention center shortly before 9 p.m. Tuesday and was greeted with hugs from his jubilant wife and two young daughters. He thanked supporters and the media before being whisked away in an SUV.
"The order to release Pablo Villavicencio from federal detention is a victory for New Yorkers and for basic human rights -- but it shouldn't be," said New York Gov. Andrew Cuomo. "Mr. Villavicencio was held for 53 days, and that is 53 days too long-this never should have happened."
The pizza delivery man detained by ICE agents in Brooklyn appeared in court Tuesday.
Supporters rallied in front of the court to free Pablo Villavicencio before the deportation hearing.
The judge had to decide whether Villavicencio, who has become one of the nation's most famous illegal immigrants since his arrest on June 1, would be able to stay in the United States or if he would be sent back to Ecuador.
Villavicenio, who came to the US in 2010 and is a married father of two American citizens, was detained while delivering pizza to Fort Hamilton.
A guard demanded an ID, and Villavicencio provided a New York City-issued card. The guard checked a computer and found Villavicencio was ordered out of the country in 2010.
There was a warrant for his arrest, and for the past 53 days, ICE held him at a jail in Kearny, New Jersey.
The fact that he is married to an American complicates the situation, but still, the federal government wants him out.
"The reason immigration detains individuals is because they are a threat to national security or they're a flight risk," immigration attorney Cesar Vega said. "As the Trump administration has said, they're going to go after the 'bad hombres.' But Pablo is a family man. He's a loving father, a loving husband, and the judge realized that."
Villavicencio hoped to get out of jail so he can petition the government for legal status, and in court, Judge Crotty had questions for the government.
"What is the danger to the country for a man who has not committed a crime?" he asked. "Is he a threat to the country? Is he a flight risk?...Is justice being served, or are we just doing what we want to?"
Supporters were hopeful.
"The judge posed some pretty difficult questions that the government was unable to answer," said Gregory Copeland, of the Legal Aid Society. "We remain hopeful that Pablo will be back with his family very shortly."
(The Associated Press contributed to this report.)
* More Brooklyn news
* Send us a news tip
* Download the abc7NY app for breaking news alerts