It happened at Utica Ave and Avenue K in the Flatlands section, just before 2 p.m.
Two detectives from the 63rd precinct were driving eastbound on Avenue K when they saw two men fighting on the street.
The detectives got out of the car to break up the fight, and noticed one of them had a box cutter.
The detectives gave the man carrying the box cutter multiple warnings to drop his weapon.
Police say the man refused, and continued to try and fight the other man.
One of the detectives then got in the middle to keep them separated, but the man with the box cutter kept walking toward the detective and the other man.
That's when the detective fired one shot that struck the man in the torso.
The man was taken to Kings County Hospital in critical condition.
The detectives were not injured, but were taken to the hospital for evaluation.
Police say this all started when the man with the box cutter threw something at a car driving by.
"The perp that ends up getting shot is standing on the street corner. When the car passes, it appears he throws an object at the car, causing the operator of that vehicle to stop and they engage in the dispute. It was unprovoked," NYPD Chief of Detectives Joseph Kenny.
Officials say the man who was shot has a criminal history, and three previous interactions with police for mental health issues.
Police recovered the box cutter at the scene.
They say the incident was all captured on security camera, and the investigation is ongoing.
----------
* More Brooklyn news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube