A jealous police officer hounded his ex-lover after they split and used the force computer system to track her movements.
Daniel Hamilton had met Lauren Boyle while both were training to join the police.
They dated for almost a year before she discovered him checking her phone messages on holiday.
Miss Boyle woman dumped him but spurned Hamilton then used official police software to keep tabs on his ex.
He even turned up at a meeting Miss Boyle was having with her former husband to discuss their divorce.
Hamilton was later held by colleagues after the woman reported him to a boss.
It landed the 31-year-old in the dock at Glasgow Sheriff Court.
Hamilton – who has since resigned from Police Scotland – pled guilty to two charges of acting in a threatening and abusive manner.
He was bailed pending sentencing next month.
A hearing was told the pair met at police college in 2017.
The first sign of problems came months into the relationship when Hamilton flew into a rage at his home in the city’s King’s Park.
The couple had an argument about Miss Boyle’s social media accounts.
Prosecutor Alistair Shaw: “Hamilton got up and walked away. However, in doing so, he punched the bedroom door.
“Miss Boyle was alarmed by his outburst and initially began to pack her belongings to leave.
“Hamilton apologised and she remained at the house.”
The couple then went on holiday last October when Hamilton’s jealousy again got the better of him.
Mr Shaw added: “He was caught by Miss Boyle looking through her mobile telephone. She believed this to be the final straw.”
The couple split but Hamilton went on to use police software to track Miss Boyle.
Mr Shaw added: “He completed a search for Miss Boyle and this revealed two incidents that she dealt with the previous day.
“Hamilton accessed and viewed both of these incidents when there was no obvious need to.”
Miss Boyle later met her former husband at Taymouth Marina in Perth to discuss their divorce.
She was then horrified after spotting Hamilton’s car parked nearby.
Mr Shaw said: “She knew Hamilton belonged to the car and became alarmed that he knew her whereabouts and had followed her.”
The court heard Miss Boyle then got emails from Hamilton to her work account.
This lead to her eventually alerting her supervisor.
Hamilton was arrested at his home, but made no comment to the allegations.
Andrew Park, defending, told the court that Hamilton has since resigned as a police officer. He had been based in Edinburgh.
Sheriff John McCormick deferred sentence for reports.
Last week a member of Miss Boyle’s family said: “She just wants to put it behind her now.”
Enjoy the convenience of having The Sunday Post delivered as a digital ePaper straight to your smartphone, tablet or computer.
Subscribe for only £5.49 a month and enjoy all the benefits of the printed paper as a digital replica.
Subscribe