The 22-year-old New York man who Ridgefield police tracked and seized near the high school Wednesday afternoon was being investigated by the Bedford Police Department for mental health reasons.

A Bedford police officer said there were no charges pending from his department, and that Ridgefield officers helped commit the man to hospital for further evaluation.

Several attempts to reach Ridgefield police went unreturned.

According to a Facebook post from the Ridgefield Police Department, the suspect had gotten into a dispute in Bedford around 1:30 p.m. and drove away towards the Connecticut border.

The post said the man abandoned his vehicle on O'Neil Court in Ridgefield — just beyond Scotts Ridge Middle School, causing high school and middle school students to be held inside their respective schools for 30 minutes under the district’s “shelter in place” protocol.

The man was later found on Craigmoor Road after a 45-minute foot chase that included K9 officers from Ridgefield and New York state police.

He was given medical attention before transported to Danbury Hospital by the Ridgefield Fire Department, the post said.

"We advised Ridgefield Public Schools to have RHS and SRMS students shelter in place during the search," police said.

"There was no threat of violence to students and staff; however, we felt the shelter in place was necessary due to the police activity on school grounds. We appreciate the cooperation of parents, students, school staff and administrators, and bus company personnel."