Attorneys for The Legal Aid Society obtained the temporary stay for Pablo Villavicencio after a hearing in Manhattan federal court.

The 35-year-old married father of two young girls was arrested on June 1 while making a delivery to the garrison in Fort Hamilton. A routine background check revealed there was a warrant for his arrest for immigration law violations.

Federal Judge Alison Nathan granted the stay until July 20. Villavicencio will remain in Immigration and Customs Enforcement custody in New Jersey until his case goes to court.

In a letter to the ICE office in New York, the Democrat said Villavicencio’s “expedited removal serves no legitimate public safety purpose and the circumstances leading to his arrest and detention raise serious legal and policy concerns.”

Villavicencio’s wife, Sandra Chica, is an American citizen and their daughters, ages 2 and 3, were born in the U.S.

When he arrived at Fort Hamilton, guards requested identification and he produced a city identification card. A background check showed that Villavicencio had been ordered to leave the United States in 2010, but stayed.

Redmond Haskins, a spokesman for The Legal Aid Society, a not-for-profit organization that provides free services to clients who cannot afford them, said Villavicencio has no criminal record.

Haskins said attorneys worked through the night preparing the emergency stay request that was argued in court on Saturday afternoon.

“Although we are disappointed that Pablo will remained detained, today’s stay is a victory for him and his family, and also for due process and the fair administration of justice,” said Gregory Copeland, the supervising attorney of Legal Aid’s Immigration Law Unit. “This decision is also a reminder that the judiciary can still serve as a powerful check when other branches of government make hasty, cruel and reckless decisions.”

The attorneys said they will work with Villavicencio to help him secure valid immigration status.