A pizza delivery man arrested for being in the country illegally after he brought food to a Brooklyn military base has temporarily won his bid to stop his deportation.

A federal judge approved Pablo Villavicencio’s emergency application Saturday.

Villavicencio — who might have been deported as soon as Monday — will now remain in the custody of US Immigration and Customs Enforcement as he pursues permanent residency, the Legal Aid Society said.

The stay issued by the Manhattan Federal Court is in effect until July 20. The order prevents authorities from moving Villavicencio out of the metro area.

“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,” Gregory Copeland of the Legal Aid Society’s Immigration Law Unit said.

“The Court agreed with our argument that Pablo should be afforded a full and fair opportunity to present his case in Federal Court,” he added.

His wife, Sandra Chica, feared the deportation was imminent after his commissary account at the Kearny, NJ, immigration facility where he’s being held was frozen Saturday.

Villavicencio told his wife he has seen other inmates go through the same process: their accounts are locked up, then they’re deported days later.

An undocumented immigrant from Ecuador who lives on Long Island with his American wife and kids, Villavicencio said he went to the Fort Hamilton base on June 1 to deliver pasta to a sergeant, and flashed his city-issued IDNYC card.

Once inside, guards demanded more identification and conducted a background check which revealed the father of two had been ordered to leave the United States in 2010. They called ICE.

Villavicencio is “a man who wants nothing more than to stay with his wife and daughters,” said Natalia Aristizabal, of the group Make the Road New York. “While we are disappointed that he will remain in detention for now, our community will do everything it can to bring Pablo home to his family, where he belongs.”

Before the stay was issued, Chica was grappling Saturday with whether to take her two young daughters to see their dad.

“This week has been really hard for them. My 4-year-old daughter is very stressed and scared about everything, so I don’t want to show her more,” she said. “It’s not a place for kids.”

Villavicencio is eager to see his daughters.

“He’s asking me about the kids and to say bye to them,” Chica said.

Gov. Cuomo wrote a letter of support for Villavicencio Saturday to Thomas Decker, ICE’s Field Office Director in New York. It was the governor’s second such letter in as many days.

“Mr. 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 that warrant proper investigation and adjudication,” Cuomo wrote.

U.S. Rep. Nydia Velazquez is among the outpouring of politicians and protesters calling for Villavicencio’s release.

“Mr. Villavicencio has no criminal record, works hard to support his family and pays taxes,” she wrote in a joint letter with U.S. Rep. Kathleen Rice. “He should be allowed to return home to Long Island so that he can continue providing for his family.”

With Wires