A former Minnesota prison warden fired for alleged sexual harassment and bullying is suing the state for the right to return to his job.

Steven Hammer sued the state and the Minnesota Department of Corrections (DOC) and Minnesota Department of Management and Budget in Ramsey County District Court on Monday. Hammer is asking that he be reinstated to his former job as warden of the Stillwater prison, or, a similar position, and for all back pay dating to his termination in October 2016.

Hammer’s suit comes after an attempt to be reinstated through arbitration.

The DOC fired Hammer when an investigation revealed that he used work e-mail to send sexually explicit messages, inappropriately commented about an intern and verbally abused employees.

Hammer, who began working for the DOC in the early 1990s, challenged the firing. Arbitrator Arthur McCoy issued a decision last October reversing his termination.

In arguing for Hammer’s reinstatement and full back pay, McCoy wrote that the e-mails appeared to be sent to people who “welcomed the sexual banter and participated fully in it,” and were not sexual harassment or discrimination.

McCoy also dismissed other allegations against Hammer, including his “sexualized ogling” of a female intern.

The DOC asked the Court of Appeals to review the arbitrator’s decision, and also asked the Bureau of Mediation Services (BMS) to delay reinstating and paying Hammer.

According to Hammer’s suit: The BMS assigned McCoy to decide whether the DOC’s request should be honored. The DOC fought McCoy’s assignment and lost.

McCoy issued an order on Jan. 5 denying the DOC’s request, writing that Hammer’s unemployment had caused “significant harm” to him and that the “balancing of interests” favored Hammer.

“Moreover, the public has little or no interest in the fact that the DOC operation and thus any back pay award are funded with taxpayer dollars,” McCoy wrote.