BROOKLYN (PIX11) — Schools around the subway station where a gunman opened fire on Tuesday were placed under shelter-in-place orders for hours, officials said.

The move happened out of an abundance of caution, Schools Chancellor David Banks said. Officials said students would not be kept from entering school buildings.

The order was lifted for most schools by 2:45 p.m., but it remained in place for those in close proximity. Officials said students were in a “safe, caring, and supportive environment.”

“We are working closely with NYPD and school leadership to ensure that every school has the supports they need as we work to ensure the safety of our school communities,” Banks said. “We will share updates as they become available. My thoughts go out to the victims of this tragedy.”

The following schools remained sheltering-in-place until dismissal, which was be managed: PS 24, Sunset Park High School, PS 371, Little Brooklyn Pre-K Center (219 25th St), and Little Brooklyn Pre-K Center (173-177 25th Street).

Police were expected to help with safe trips home and principals will send specifics to parents. There will also be MTA shuttle buses for students who need transit to subway stations.

Parents with questions should contact school leadership for specifics regarding their school’s dismissal method.

Extracurricular programing and PSAL may be canceled at some schools. Parents should contact their school’s principal about updates to after-school programming.

Elsa Velez, who was picking up her grandkids, felt relieved that no one was being let in and out of schools. She said a teacher texted families to keep them updated.

Chancellor Banks visited schools. He said there was a great level of confidence around safety.

“The kids have gone about having a normal a day as they could,” he said.