A police officer "arrogantly" tried to film a female colleague as she showered at their force headquarters unisex changing rooms, a jury has heard.
PC Jonathan Eaton, 32, of Gloucestershire Police, denies a voyeurism charge relating to an incident on 27 February 2019.
Newport Crown Court heard the woman spotted the phone being held underneath the partition as she was drying off.
PC Eaton was suspended from duty when he was arrested.
Prosecutor Matthew Roberts said the woman was taking her routine shower at 07:15 GMT at the headquarters in Waterwells Drive, Quedgeley, Gloucester, before starting work but was using a different cubicle to normal.
He told the court: "She could not see who was handing the phone but clearly recalls the phone cover.
"Almost immediately a man tried to leave the shower complex and the woman shouted 'stop that man', to which two other police officers responded."
Phone memory wiped
The woman noticed the phone he was carrying was the same she had seen and the man's head was "completely dry" as he walked away after being challenged, the court heard.
Mr Eaton was arrested later that morning and said in his interview "his balding hair was out of place and he needed to use the high pressure shower to wash it so that it would stick down," Mr Roberts said.
The jury was told that Mr Eaton phoned in sick to work and had gone home.
Subsequent investigations by police showed he had left the force headquarters at 08:03 and returned home at 08:49 and within 40 minutes the phone had been reset.
Upon Mr's Eaton's arrest, officers discovered his phone's memory had been wiped.
Mr Roberts said: "Anybody using shower facilities at work is entitled to shower in privacy, likewise colleagues are entitled to mutual trust and respect.
"Eaton abused that trust arrogantly and blatantly," he added.
PC Eaton, of Lasne Crescent, Brockworth, Gloucester, was training to become a detective constable in CID.
The trial continues.