An "armed and extremely dangerous" man who allegedly fired shots at a Hudson Valley hospital and at officers is facing a number of charges including attempted murder.

On Sept. 28, 42-year-old Joshua Stuart of Kerhonkson allegedly entered the Ellenville Regional Hospital with a loaded handgun and forcibly stole numerous vials of drugs classified as opioids.

During the course of the robbery, he fired one shot from his gun inside the hospital, police say.

After fleeing the hospital, Stuart’s car was spotted in a wooded area off Cutler Road in Wawarsing. As the officers attempted to apprehend him Stuart fired several rounds from a 9MM handgun at officers and then fled into a large wooded area, officials say.

An intense manhunt ensued. Many local police agencies including the State Police, Ulster County Sheriff’s Office, DEP, the Ellenville Police Department and the Ulster County District Attorney’s Office searched for Stuart.

The next morning, Stuart is accused of burglarized a home on State Route 55, entering a second home looking to take a car and stealing from a third home.

While inside the third home, Stuart allegedly stole a purse and car keys and fled the property in the homeowner’s 2005 Honda Pilot.

The Honda Pilot was spotted in Brooklyn on Oct. 1. He was soon spotted near a Whole Foods Market in Brooklyn. Stuart attempted to flee into the Gowanus Canal and was captured shortly thereafter, police say.

On Thursday, an Ulster County Grand Jury handed down an 11-count indictment charging Stuart with attempted murder, robbery, three counts of burglary and criminal possession of a weapon in connection with his alleged crimes in the Hudson Valley.

He also faces federal charges.