She violated the penal law.

Upstate New York police are buzzing with anger today after a woman threw a pink sex toy that hit an officer in the head.

The Smoking Gun reported that cops went to the Watertown home of Lisa Anderson, 47, on a complaint of an "unwanted person" in the home at 3 a.m. What happened next left officer Jonathan Pitts red in the face.

"With intent to harass, annoy, or alarm another person, [Anderson] did throw a pink in color sex toy toward Officer Pitts, the victim, and struck him in the forehead," according to court documents.

The cop wasn't injured, but he slapped Anderson with some equally sexy paraphernalia: handcuffs.

Anderson was arraigned today on a charge of misdemeanor harassment and released.