Cops shot a man Saturday night in Bushwick after they say he struck a police car and an officer with a wooden cane.

Two officers were patrolingnear the Myrtle Avenue J station around 10:30 p.m. when they saw Dairon Bledsoe allegedly hit their patrol car with a wooden cane.

When the cops told the 27-year-old to stop, he fled but one of the officers chased him, police said.

The officer caught up to the suspect, who was still holding to his cane, in front of a building on Broadway, and confronted him with her baton, the NYPD said.

Bledsoe allegedly struck the officer with his cane in the head, with a blow so strong that it broke the object in two pieces, according to the police.

Bledsoe was going to strike the officer again but her partner caught up, and shot the suspect in the upper body, police said.

The suspect was taken to Kings County Hospital while both officers were taken to Wyckoff Hospital, all three were listed in stable condition according to police.

The NYPD charged Bledsoe with several criminal counts including assault on a police officer with a deadly weapon.