A federal judge in Manhattan on Saturday temporarily halted the deportation of a New York pizza delivery man at least until a court hearing on July 20.

The judge, Alison J. Nathan, of Federal District Court in New York, ruled for the plaintiff, Pablo Villavicencio Calderon, after his lawyers filed an emergency petition earlier in the day. In her order, the judge said federal officials must file court documents before the hearing to explain why a temporary preliminary injunction should not be issued in favor of Mr. Villavicencio, who is still being detained.

Judge Nathan was appointed by President Barack Obama in 2011. From 2009 to 2010, she served as special assistant to Mr. Obama and was an associate White House counsel.

Mr. Villavicencio, 35, was delivering from a pizza restaurant in Queens to an Army base in Fort Hamilton, Brooklyn, on June 1 when he was turned over to Immigration and Customs Enforcement agents by a military police officer. A background check revealed that Mr. Villavicencio, a native of Ecuador, had an open order of removal since 2010. He was immediately taken to the Hudson County Correctional Facility in Kearny, N.J.