PORTLAND, Maine (AP) — Corrections workers in Maine thwarted an attempt by an inmate to escape from custody through bathroom ceiling tiles when he was at a hospital.

The Cumberland County Sheriff’s Office said the inmate tried to climb through the ceiling tiles at Maine Medical Center in Portland on Tuesday morning. The office said the inmate was in restraints at the time and was in the process of being discharged from the hospital.

The sheriff’s office said corrections staff intervened and prevented the escape without further incident. The office said it referred the escape attempt to the investigation division to see if charges are appropriate.

The inmate has since been returned to jail.