A police officer unlawfully tasered a man who threw his underpants at his head during a strip search, a court has heard.
PC Lee Birch, 31, discharged his weapon into the bare chest of Daniel Dove at Melksham Police Station in Wiltshire, after he was arrested outside a nightclub on 23 December 2012.
Mr Dove was charged with disorderly conduct and assaulting PC Birch and a second officer, though the case against him was later dropped.
Prosecutor Robin Shellard told a jury PC Birch had used the "prohibited weapon" in a way that was not "necessary, lawful or proportionate”.
Mr Dove told the court he was "compliant the whole time" and followed orders when he was asked to undress before he was strip searched by PC Birch and two other officers attending.
He said: "He [Birch] asked me to get naked, which I did. I did feel I had shown enough so they knew I had nothing on me.
"When he asked me to do it, I did feel quite embarrassed. I took my pants off and flicked them at him, towards his face. I was annoyed at him.
"As soon as I flicked my pants at him, he pulled his arm up from behind his back and shot me with a Taser.
"By the time I had seen it, I had no time to react or move. I couldn't hide anywhere, I was in a police station so couldn't run off. There was a lot of pain."
Mr Dove told the jury he had been assaulted by Birch and a second officer during his arrest and pushed down into a puddle on the street.
He also insisted PC Birch had overly tightened his handcuffs, causing him pain in his wrists.
PC Birch was charged with assault occasioning body harm and misconduct in a public office, which he denies.
The trial continues.