NEW YORK — Dahlia Bolt said she was walking in Downtown Brooklyn on Tuesday afternoon when she heard gunshots and ran for cover.

“We hid beneath the scaffolding for a little bit and I’m like, what’s going on?” Bolt said.

She was heartbroken to learn a fellow New York University student was shot in the arm near 6 MetroTech Center, home to the university’s Tandon School of Engineering, which she attends.

“It makes it real sad that he was just on the sidelines when it happened,” Bolt said. “I hope he’s okay.”

A 19-year-old New York University student was shot around 3 p.m. outside the NYU Tandon School of Engineering, New York University said in a statement.

The student, who was not identified, entered one of the buildings, looking for help after he was hit. He was taken to Methodist Hospital and was expected to survive.

“It’s shocking, honestly,” student Adam Vinner said. “This seems like a very safe area to me and I never would’ve guessed something like that could happen.”

According to a spokersperson, the university's understanding was that the shooting was the result of a dispute that started elsewhere in the area of the school, and the student was struck by a stray bullet or a ricochet.

The university plans to talk to law enforcement about what can be done to enhance safety in the area.

Police recovered ballistics on the scene.

Half an hour later — in a shooting that police said was separate — a 27-year-old man was shot in the ankle at Jay Street and York Street, half a mile away.

That victim was transported to Bellevue Hospital and was expected to survive.

No arrests have been made at this time in either case. An investigation is ongoing.

The details of what lead up to the two shootings are not known at this time.