A killer strangled his girlfriend then sent a text message to her son pretending to be her.

David Anderson strangled Louise O'Brien at their flat in Perth in April.

Ms O'Brien, 36, was discovered dead on a bed with a heart-shaped chocolate beside her.

Anderson is thought to have used her phone to contact her 11 year-old son to make it appear as if she was still alive.

He went on to carry out a web search trying to discover if murder accused are locked up.

The 41-year-old eventually confessed to his mother he had "done something terrible", at which point police were called and he was arrested.

Anderson faced a murder allegation as he appeared at the High Court in Glasgow on Friday but prosecutors instead accepted his guilty plea to the reduced charge of culpable homicide.

The couple had been together for around a year before the killing, the court was told.

In a text message weeks before the attack, Anderson told Ms O'Brien: "I've given my life to you. I have no interest in anyone else."

The call centre worker later told a colleague he was going to leave her, however, and move to Dundee.

Former bar worker Ms O'Brien was last spotted on April 24 before her body was discovered four days later.

During that time, Anderson called in sick to work. He was described as "sounding lost" and not his usual "chirpy self".

The killer made a series of web searches including: "If you are accused of murder, are you automatically put in prison?"

On April 28, Anderson contacted his mother to tell her: "I've done something terrible and I've been unable to deal with it mentally for days. I tried to hurt myself because I could not deal with it.

"I don't want to tell you but it'll come out anyway. I have broken the law. It is very serious."

Police were alerted and officers went on to discover Ms O'Brien's body in a bedroom.

The court was told the exact cause of death was unclear but her injuries were consistent with "manual strangulation".

Judge Lord Boyd deferred sentencing until September and ordered Anderson to be remanded in custody.