EDISON -- A judge has reinstated an Edison police officer who was fired after allegations that he pressured a woman to model Victoria's Secret lingerie for him while he was in uniform.

Anthony Sarni sued after he lost his job in October for his conduct at the Extended Stay America hotel, which the Superior Court Judge Douglas K. Wolfson referred to simply as the "lingerie episode."

The episode began when a woman said that Sarni returned to her hotel room after responding to an emergency call and -- using the marijuana he had let her flush down the toilet as leverage -- requested that she model lingerie for him. She eventually complied, and Sarni admitted he asked her to try on "outfits." But he denied that marijuana was involved at all, denied explicitly propositioning her for sex, and said the encounter was consensual.

"We are pleased that now two tribunals, a hearing officer and a well respected experienced Superior Court Judge, have concluded after hearing the evidence that Officer Sarni did not lie or provide false information to internal affairs," Sarni's lawyer, Steven Cahn, said in an email, adding that the officer regrets his actions that night. "Officer Sarni is anxious to get back to work serving the residents of the township. He wants to get back to work."

When, exactly, he'll get back to work depends on whether the town plans to appeal his case. Lawyers for the township did not immediately respond to requests for comment. Sarni has five days to request an order, giving the town some breathing room to decide what to do next.

The police department's botched effort to fire Sarni was marked by failures on multiple levels, including missed deadlines and an Internal Affairs investigation that was, according to Wolfson, severely compromised.

Wolfson himself acknowledged that Sarni's alleged conduct in September 2012 was "deplorable and entirely unacceptable." But, in a 40-page written decision released Tuesday, Wolfson noted that Sarni could not be fired for requesting that the woman try on lingerie for him.

That's because the charges related to the lingerie itself were thrown out on a technicality after the town missed a well known 45-day deadline.

After the Middlesex County Prosecutor's Office closed its own criminal investigation in 2013 without charges, the town waited 30 days to even interview Sarni, and 99 days to file charges, a delay the judge called "inexplicable." Chief Thomas Bryan explained the delay in part by saying that several officers were on vacation, according to Wolfson's decision.

In the end, the town could only charge Sarni for his lies to Internal Affairs investigators about the lingerie, not the lingerie itself.

But Wolfson ruled that investigators Joseph Shannon and Thomas Errico asked inappropriate questions, leading Sarni to believe that the investigation might be criminal, and not administrative.

The town claimed that Sarni lied 23 times about the lingerie request, but Wolfson decided that Sarni was honest as soon as he believed that the interview was not a criminal interrogation.

The charges, he said, were "fundamentally flawed," and "devoid of competent or credible evidence." They were thrown out with prejudice.

Much of the 40-page decision deals with technicalities related to employment law in New Jersey. A hearing officer -- akin to an internal judge hired by the town -- threw out the previous charges against Sarni, but Mayor Thomas Lankey ignored the recommendation, without explaining why. Wolfson ruled that Lankey was not bound by the hearing officer's recommendation, but overturned Sarni's firing on the merits.

Sarni, who has not received his paychecks since he was fired, will get back pay. The town might also have to pay his legal bills. He is the second officer in the past six months to be returned to work in the Edison Police Department amid efforts to terminate his employment.

Coincidentally, Sarni was ordered reinstated the same day that a Perth Amboy police officer was promoted to lieutenant, even though he'd been suspended for visiting his romantic partner in an undercover vehicle while on duty -- in the span of just a few hours, two high-profile examples of the strong employment protections that public employees, particularly police officers, enjoy in the state of New Jersey.

Brian Amaral may be reached at bamaral@njadvancemedia.com. Follow him on Twitter @bamaral44. Find NJ.com on Facebook.