PERTH AMBOY, N.J. (AP) — Authorities say a New Jersey man was arrested after an exchange of gunfire with police officers in which no one was injured.

The Middlesex County prosecutor's office says police in Perth Amboy were trying to arrest a 21-year-old suspect Thursday night in a shooting earlier in the day.

Perth Amboy police reported that as four city detectives approached, the suspect opened fire. Officers exited the vehicle and identified themselves as police officers, and some returned fire. No one was struck in the exchange of gunfire.

The prosecutor's office says 21-year-old Isaiah Peralta is charged with four counts of attempted murder, aggravated assault, firearms and drug charges as well as charges in the earlier shooting.

It's unclear whether Peralta has an attorney; a listed number for him couldn't be found Saturday.