Authorities say 23-year-old Norman Vanigas opened fire at the officers in Brighton Beach when they stopped him on Sunday.
Vanigas apparently fit the description of the man who sexually assaulted a 21-year-old woman hours earlier on Ocean View Avenue.
No officers were injured, and they did not return fire.
Police took Vanigas into custody Tuesday.
WAKE UP WITH EYEWITNESS NEWS! Click here to download the WABC Eyewitness News Alarm Clock app from iTunes. or search WABC or 7online in the app store.
Get Eyewitness News Delivered