The incident happened around 8 p.m. at New York Avenue and Avenue D.
The officer was taken to a nearby hospital, where he is expected to survive.
RELATED: Eyewitness News is tracking crime and safety across New York City and in your neighborhood
Police have taken two men into custody.
No further details have been released.
This is breaking news. This story will be updated as more information becomes available.
----------
* More Brooklyn news
* Send us a news tip
* Download the abc7NY app for breaking news alerts
* Follow us on YouTube