Police ordered a lockout at Gray-New Gloucester high and middle schools Thursday afternoon while they searched the area for a man in connection with two burglaries.

Nickolas J. Mains, 40, was taken into custody about 3:45 p.m., according to a news release from the Cumberland County Sheriff’s Office. He was wanted in connection with burglaries of a home and a car in Casco on Thursday. He was also wanted on multiple warrants.

Nickolas J. Mains

Chanda Turner, the director of curriculum and staff development for Maine School Administrative Unit 6, said the sheriff’s office requested the lockout shortly after noon. The sheriff’s office said the schools resumed normal activity when it was determined that Mains had left the area.

During a lockout, no one is allowed to enter or exit the school, but business as usual is happening inside.

Turner said the lockout did not involve a threat of any kind to the schools.

“This incident didn’t involve the school,” she said. “It didn’t involve any of our students, and it didn’t involve a threat to our school. All of our actions were precautionary to make sure our kiddos were safe.”