ST. PAUL, Minn. (AP) _ The Minnesota Court of Appeals has reversed an arbitrator's decision to reinstate the Stillwater prison warden who was fired after sending sexually-explicit emails.

The Appeals Court ruled Monday that Steven Hammer violated Department of Corrections policy, and the agency had just cause to fire him.

Hammer was fired in 2016 after allegations that he sent lewd emails, shared personnel data and engaged in other inappropriate behavior. But last year, an arbitrator ruled he should be reinstated, saying the Corrections Department lacked just cause to fire him.

The arbitrator found he should have faced discipline before being fired.

But the Appeals Court disagreed. Hammer has not returned to work while the appeal was pending.

Hammer's attorneys had no immediate comment. They have the option of asking the Supreme Court for review.