NEPTUNE - An undercover detective posing as a gun buyer fired a shot after allegedly being assaulted by a group of teens in Neptune.

The officer, with the Monmouth County Prosecutor’s Office Narcotics Task Force, was trying to buy a handgun from four teens in a parking lot Friday night along Bangs Avenue.

Authorities say one of the teens pulled out the gun and struck the detective. He then fired at least one shot from his department-issued handgun, but did not strike anyone.

The four alleged assailants were 18-year-old Allen Taylor, a 16-year-old and two 17-year-old males, state authorities said. They face armed robbery, aggravated assault and weapons charges.

The detective was treated and released from a hospital.