Damian Esteban, 34, who taught at Williamsburg High School for Architecture and Design, was reinstated Thursday by Manhattan Supreme Court Justice Manuel Mendez, who called the decision to fire the teacher "excessive and shocking to this court's sense of fairness," the New York Daily News reported Friday.
Esteban was fired after he was found to have heroin in his backpack when he showed up for jury duty at Manhattan Criminal Court in October 2012. The teacher admitted he was a recovering drug addict and said he had accidentally grabbed the wrong backpack before going to court.
Misdemeanor charges against Esteban were dropped after he attended a treatment session.
The judge said Esteban has a "spotless" record in the classroom and there was no evidence his conduct would negatively impact his work.
Mayor Michael Bloomberg said the city will appeal the decision.
"We could not disagree more strongly with the judge's decision," Bloomberg said.
2014: The Year in Music [PHOTOS]