A New York school district ordered four schools on "lockout" Friday after a prisoner escaped police custody with a gun.

The Monticello School District ordered the safety measure after being notified of the escapee by the local sheriff’s office.

As the search continued for the escapee, Superintendent Tammi Mangus said students would be allowed to go home at the end of the school day. She ordered all after-school activities canceled.

The Middletown Times-Herald said the affected schools were the Robert J. Kaiser Middle School, Monticello High School and two elementary schools, George L. Cooke and Kenneth L. Rutherford.

"All elementary students have arrived to school safely. All schools within the Village of Monticello will remain on lock-out until further notice from the Sullivan County Sheriff's Department," the district said in an 11 a.m. note to parents on its website.

Mangus lifted the lockout at 1:40 p.m.

A lockout meant students could still go from class to class, she said. A lockdown would have meant they could not leave their class.

Police were also posted at the schools, the paper said.