HILLSDALE, Mich. (AP) — Police in Hillsdale County are pursuing an appeal after a judge said they can be sued for errors that led to a 17-month prison stay for a man who didn't belong on Michigan's sex offender registry.

Anthony Hart was released from prison in 2015 after the state Corrections Department discovered the mistake. He had pleaded guilty to failing to properly register his address, but it turned out that Hart didn't need to register. He should have been removed in 2011.

Hart sued Hillsdale County sheriff's officers and Hillsdale city police, saying his rights were violated. They argued that they have governmental immunity, but federal Judge Denise Page Hood rejected their position.

The judge put the lawsuit on hold Monday while the county and city appeal her decision.