David Baril, the man accused of attacking a police officer and at least four other people with a hammer this week, was arrested on felony assault charges on Thursday morning. 

Baril, 30, was arrested at Bellevue Hospital, where he was taken Wednesday after being critically shot by an NYPD officer in Midtown.

The suspect was shot after allegedly hitting Officer Lauren O’Rourke with a hammer in the area of West 37th Street and Eighth Avenue. O’Rourke and her partner, Officer Geraldo Casaigne, recognized Baril’s photo, which had been distributed to all patrol officers, and the man attacked the officer after he realized he was being followed, Police Commissioner Bill Bratton said during a press conference on Wednesday. 

Bratton said Baril likely attacked four other people on Monday with the same hammer

Baril has a history of mental illness, and was believed to be living on the streets after leaving a mental health facility in Upper Manhattan in January. He was shot in his head, torso and right arm, and the NYPD released a video of the encounter a few hours after the incident.  

Baril was arrested on seven counts of felony assault, and one charge of criminal possession of a weapon, police said. He has eight prior arrests, including attempted assault on a police officer.