An officer with the Salisbury (NC) Police Department heard the sound of gunfire while on foot patrol on Tuesday night and quickly swept into the area to make an arrest.

According to WBTV, the officer heard six to nine gunshots and ran to where four young men were gathered. The officer searched the men and discovered that one subject—identified as 19-year-old Alterek Simpson—was in possession of a handgun that had recently been fired.

Simpson reportedly told police that he and his friends had found the gun and had been shooting it randomly.