NEW YORK (CBSNewYork) – A man is facing charges after he allegedly opened fire on police in upstate New York, sparking a three-day manhunt that ended in Brooklyn.

Joshua Stuart, 42, was arrested Monday night and charged with robbery, criminal possession of stolen property, criminal possession of a weapon and criminal possession of a controlled substance.

READ MORE: Valanciunas, Hart Lead Pelicans Past Knicks

Marina Rosado told CBS2 she was there as officers chased Stuart outside a Whole Foods in Park Slope, ordering bystanders to get out of the way.

“All of a sudden, we see like 15-20 cops juts come, and guns drawn, and yelling at the suspect,” she said.

He then headed toward the rocks leading to the Gowanus Canal.

“They ran, we saw him jump over the rail, and then he got into the water like halfway I guess. And they’re telling him,  ‘get out of the water, get out of the (expletive) water,’” said Rosado.

READ MORE: New York Weather: CBS2’s 1/21 Friday Morning Forecast

The manhunt began Friday after Stuart allegedly fired shots at officers in Ellenville, Ulster County.

On Monday, investigators said he robbed a Bay Ridge tobacco shop at gunpoint, taking off with an employee’s wallet containing $50 and a credit card. Police said he was desperate for cash, possibly to feed a heroin addiction.

Stuart left the scene in a gray SUV, later found in Park Slope. Someone reported seeing him on a bench with a bag and wearing just one shoe.

“It was surreal,” Rosado said.

MORE NEWS: Armed Suspect Dies After Police-Involved Shooting In Williamsbridge Section Of Bronx

Police said a handgun was recovered at the scene. It’s still unclear when Stuart will be charged for allegedly shooting at police upstate.