US District Judge P Kevin Castel criticised the city repeatedly before finding it was probable Officer Masood Syed would succeed and issuing a temporary restraining order that will remain in place until a July 8 hearing.
The department says it bans beards as a safety measure so gas masks fit tightly across faces but allows beards for religious reasons up to 1 millimetre in length.
"I am very relieved," Syed said afterward as he celebrated his 32nd birthday with a half dozen fellow officers supporting him in the Manhattan court.
Syed said two uniformed supervisors escorted him from Manhattan NYPD headquarters where he works as a law clerk to administrative judges, sometimes preparing legal documents for the police commissioner about disciplinary issues.
More From This Section
"It was extremely humiliating," Syed said. "I felt insulted, frankly."
Syed said he has maintained a 1-inch beard for most of his 10-year career, only occasionally drawing critical comments. He said he hoped his lawsuit, which seeks class-action status, would help over 100 police employees who find the religious exception to the department's no-beard policy insufficient because they say the length of the beard allowed is not reasonable.
Occupational Health and Safety Administration regulations require annual fit-testing and prohibit respirators for employees with facial hair.
The judge became impatient as he questioned Fleming about the policy and the department's failure to respond to a December 2015 request by 37 police officers for an exception to the no-beard policy.
"Let's play 20 questions," Castel said at one point. "The court is troubled by the fact it cannot get an answer," he said at another.