BRIDGEWATER -- A township man wearing a ski mask and armed with a machete and baseball bat was arrested after he struck passing vehicles with the bat and charged towards police.

Andrew Petkoski, 25, has been charged with third-degree aggravated assault on a police officer, third-degree resisting arrest and third-degree possession of a weapon with the purpose to use it unlawfully.

Police responded to the area of Washington Valley Road and Blossom Drive at 12:34 p.m. March 10 on a report of a man wearing a ski mask with a machete and baseball bat, according to an affidavit filed in Somerset County Superior Court.

Police allegedly found Petkoski standing in the middle of Washington Valley Road striking passing vehicles with the bat. When one of the officers got out of his patrol car, Petkoski allegedly charged toward him swinging the bat, it was stated in the affidavit.

Petkoski was repeatedly told to stop and drop the bat, but he reportedly refused, even when commanded to do so while officers had their guns drawn, according to the affidavit.

Police said Petkoski threw the bat at an officer, narrowly missing his head and began to walk towards the officer quickly. Petkoski was sprayed with Oleoresin Capsicum and tackled. He continued to fight with officers before finally being handcuffed, according to the affidavit.

The machete was recovered on Washington Valley Road and the bat was at the scene. Two vehicles were damaged by Petkoski, it was stated in the affidavit.

Dave Hutchinson may be reached at dhutchinson@njadvancemedia.com. Follow him on Twitter @DHutch_SL. Find NJ.com on Facebook.