EDISON -- Township officials reacted angrily to a judge's order that they give an Edison cop his gun and badge back even as they press on in their efforts to fire him.

"To say that today's ruling outraged the township's administration and the police command staff, who have made it crystal clear they will not tolerate 'reprehensible and deplorable' conduct from municipal employees, would be an understatement," township labor attorney Allan C. Roth said in a statement.

Anthony Sarni was fired in October after admitting that he went back to a hotel room, while in full uniform and with his sidearm, and asked a woman to try on lingerie for him. But Superior Court Judge Douglas Wolfson has ruled that he should get back the gun and badge he's accused of abusing.

Not only that, Wolfson ruled on Tuesday that the town must put into motion plans to take Sarni back as an employee immediately.

Lawyers for Edison argued that, while the town waited for an appeals court to weigh in on whether Sarni should get his job back, he shouldn't report for work. The town argued that it should be able to give him full pay and benefits, as long as he stayed at home.

But Wolfson sided with Steven D. Cahn, Sarni's attorney, who said that Sarni would be harmed if he was kept out of work. Sarni has been suspended since the fall of 2013, and at 41 years old, was at risk of losing some of his skills as a police officer. After three years of suspension, he would have had to go back to the police academy, Cahn said.

"Edison will continue to pursue all legal options, including seeking a further stay of Judge Wolfson's order in the Appellate Division," Roth said in an email. "In compliance with today's decision - and barring a stay ordered by appellate courts - Mr. Sarni will submit to a fitness-for-duty exam. If he is found fit, he will be retrained in police department policies and procedures before returning to work."

In a written statement, Sarni's lawyer fired back: "More politics in the police department. If the town is serious about fixing issues in the police department then decisions need to start being made based on facts and reality rather than politics. The town has probably paid, everything included about 500 thousand dollars on this one case. A case they never could win, not based on politics but on facts, the evidence and the law."

In early January, Wolfson ruled that the town waited too long to file charges against Sarni, so although the alleged conduct was "deplorable and entirely unacceptable," Mayor Thomas Lankey coudn't fire him for it.

"Tony's very glad to be going back to work," said Cahn, Sarni's attorney. "He's a police officer. That's what he's dedicated to doing -- serving the town."

It could take about a month before Sarni is actually back to work. He is likely to be given an administrative assignment, like one in the records department.

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