Residents of the South Bridge Gardens apartment complex reported hearing two or three shots and seeing a police officer standing over a wounded man.
Somerset County Prosecutor Wayne Forrest confirmed the shooting but declined to release further details.
The wounded man was taken to Robert Wood Johnson University Hospital in New Brunswick. Neither he nor the officer was immediately identified.
A Somerville patrol car with a smashed windshield was parked at the scene. Nearby, an ax and a sledgehammer lay on the street.