MIDTOWN (PIX11) - Police shot a man Wednesday morning near Penn Station after he attacked an officer with a hammer, according to the NYPD.

Around 10 a.m., two officers walking south on 8th Avenue spotted 30-year-old David Baril, the suspect in a string of random, violent hammer attacks in Manhattan.

Surveillance video shows Baril appear to wait for the officers in the intersection of 37th Street and 8th Avenue, then pull out a hammer -- claw side out -- and strike officer Lauren O'Rourke in the head as the two struggled.

Officer Geraldo Casaigne drew his service weapon and fired four times, shooting Baril twice -- in the right arm and the torso, according to police.

Baril, dressed in blue jeans and dark clothing, collapsed onto his back in the intersection of 37th Street and 8th Avenue. He was is currently in critical but stable condition at Bellevue hospital. Police say Baril is known to suffer from paranoia and schizophrenia.

Both officers were also taken to Bellevue, O'Rourke for treatment of cuts and abrasions to the back of her head, and Casaigne for tinnitus.

Officers blocked off the normally-bustling intersection and there was a heavy police presence at the scene as NYPD brass immediately prepared a press conference.

On Wednesday morning, police had been looking for Baril after facial recognition software provided a match from a surveillance image. Baril was wanted in at least two, and possibly four attacks in Manhattan. One of those attacks happened just a couple blocks from where police shot the suspect.

Baril allegedly began his rampage around 7:30 p.m. Monday when he took a hammer out of a bag he was carrying and hit a 28-year-old woman on the head. The victim was sitting on a bench in Union Square Park at the time of the apparently random attack.

About 10 minutes later he swung again, striking a 33-year-old woman as she walked near 44 West 18th St. and leaving her with a scalp wound, police said.

A man shot by an officer in Manhattan might be linked to several hammer attacks, police said http://t.co/r68pReJbM8 pic.twitter.com/tInGNcohBF — The New York Times (@nytimes) May 13, 2015

Police were also investigating his possible connection to a third Monday attack against a man near 35th Street and Sixth Avenue.

He also may be linked to a fourth attack on a woman on 27th Street and Madison Avenue. In that incident, the woman was struck in the head with an unknown object or a hand.