PORTLAND, Maine — The state supreme court on Tuesday dismissed an escape charge against a man who served 22 years for murder before walking away from the Riverview Psychiatric Center, where he was committed.

Mark Gessner was being treated at the psychiatric hospital when he failed to return from a two-hour pass in 2018. He was charged with escape in Kennebec County, and two counts of criminal threatening in Sagadahoc County.

The Maine Supreme Judicial Court agreed with his argument that there should have been a single indictment, since his escape and subsequent threats against his brother and father constituted a single criminal episode.

One of the criminal threatening counts was dismissed and Gessner was acquitted of the other. The Maine Supreme Judicial Court dismissed the remaining escape charge in Kennebec County on Tuesday.

Gessener already served his prison sentence for the 1994 killing of Melvin Henderson, a florist in Bath. He was committed as a forensic patient to the psychiatric hospital for crimes committed while he was in prison.