NEW YORK, Ny -

A judge has overturned the firing of a New York City teacher who showed up for jury duty with heroin in his backpack.

City officials said Thursday they would appeal the ruling.

Brooklyn high school teacher Damian Esteban was arrested last year after courthouse officers discovered his heroin stash.

He did a one-day treatment program in exchange for having the charges dismissed. The city won an arbitrator's decision to fire him.

In an order issued Monday, the judge called the dismissal an "unduly harsh" punishment. He said Esteban should instead be suspended without pay.

Mayor Michael Bloomberg said Thursday that the reversal shows a "callous indifference" to the well-being of students.