(CNN) - A federal court temporarily blocked a pizza delivery man's deportation one week after he was turned over to immigration officials while trying to drop off food at a military base in New York.
Pablo Villavicencio, 35, remains in Immigration and Customs Enforcement (ICE) custody but will be kept from deportation until July 20. Villavicencio, an undocumented immigrant from Ecuador, was detained June 1 at the Fort Hamilton base in Brooklyn while delivering an order from the brick-oven pizza restaurant in Queens where he worked.
The Legal Aid Society, an organization that provides legal help to those in poverty, said in a statement Saturday that their attorneys discovered Villavicencio's deportation was imminent so they worked through the night to prepare the emergency stay request.
"This stay will allow him to pursue a meritorious form of relief from removal -- adjustment of status for permanent residency -- to remain with his family," the legal provider's statement said.
Gregory Copeland, supervising attorney of the Immigration Law Unit at The Legal Aid Society, said the stay is a victory for Villavicencio, his family and for "due process and the fair administration of justice."
"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," he said.
He had been to the base 'many times,' attorney says
Villavicencio's potential deportation triggered a national response and fear in immigrant communities.
Villavicencio filed for his green card in February and was waiting for a response when he was detained, his wife, Sandra Chica, said.
Chica is a US citizen and they have two young daughters who were born in the United States.
"He's got the wheels in motion in terms of pursuing a legal path to normalizing his status in the country," Copeland told CNN.
The day he was detained, Villavicencio was trying to deliver an order to the Fort Hamilton Army base in Brooklyn. He showed his New York City identification card to the guard as he had done several times before, but the base said in a statement that he didn't have the proper identification, so he had to get a daily visitor pass.
Villavicencio ended up "signing a waiver permitting a background check," which revealed there was an active warrant for his deportation and prompted military police to call immigration agents.
In an interview Sunday, Copeland told CNN that Villavicencio had been to the military base "many times" in the past to make similar deliveries. He'd been there enough, Copeland said, that he was familiar with the facility's personnel.
In fact, Copeland claims that in the midst of being detained on June 1, Villavicencio called a high-ranking sergeant at the base for help. According to Copeland, the sergeant, who was not named, unsuccessfully tried to intervene.
There were also "conflicting reports," Copeland said, about whether Villavicencio had actually formally consented to a background check. Copeland called for an investigation into the incident, and reiterated that Villavicencio does not have a criminal record.
'Our immigrant communities are threatened'
In response to Villavicencio's arrest, New York Gov. Andrew Cuomo wrote two letters to high-ranking officials calling for an investigation into ICE and for Villavicencio's release.
In a Friday letter to Department of Homeland Security Acting Inspector General John Kelly, Cuomo said immigrant communities are being vilified and profiled as a result of ICE tactics.
"New York will not sit on the sidelines as our immigrant communities are threatened," Cuomo wrote. "The pattern of conduct demonstrated by ICE agents shows reckless contempt for the Constitution and runs counter to the agency's stated mission as well as federal and state law. I call on your office to immediately investigate ICE tactics and ensure the rights of New Yorkers are being protected."
Cuomo wrote a letter Saturday to Thomas Decker, field office director of the Department of Homeland Security and Customs Enforcement, explaining that Villavicencio has been a resident of New York for more than 10 years and is a working father, taxpayer and the primary provider for his wife and children, one of whom has a serious medical condition.
Cuomo also said speed with which ICE is moving to deport Villavicencio threatens to violate his rights, his family's due process rights and creates "an unnecessary humanitarian crisis in New York State."
"There is absolutely no legitimate reason to proceed with an expedited removal and to do so would be inhumane," Cuomo wrote. "The proper course of action here is to stay Mr. Villavicencio's removal and release him from detention so that he may reunite with his family and participate in the proper adjudication of his case. The Constitutional guarantee of due process affords him that basic right."