NEW YORK (CBSNewYork) – A man wanted for shooting at several police officers has been arrested.

Police said 42-year-old Joshua Stuart shot at officers inside the Ellenville Regional Hospital early Friday morning in Ulster County.

Marina Rosado saw police chasing the man outside Whole Foods in Park Slope. She had no idea he might be an armed and dangerous fugitive, but then came the urgent command from police for her to get far away from the scene.

“It looked like something out of a video game,” Rasado said.

Authorities throughout the state had been looking for Stuart since Friday when they say he fired shots at police in Ellenville. Monday morning, police say he robbed a tobacco shop at gunpoint in Bay Ridge.

Police say he took off from that crime in this gray SUV, later ditching it in Park Slope before a tipster spotted him on a bench with a green bag and wearing only one shoe.

Authorities caught Stuart on the rocks leading to the Gowanus Canal. Witnesses said that, although the suspect screamed he was unarmed, police pulled a handgun from the green bag he was carrying.