A lecturer who killed his wife in a "stabbing frenzy" at their home is to be detained at Carstairs without "limit of time".

Robert Kerr attacked Xin Xin Liu, 39, in the upmarket suburb of Newton Mearns in East Renfrewshire in April, last year after wrongly believing he was not the father of their children.

He stabbed her more than 70 times as his two sons slept upstairs and went on to make himself a hot drink while she lay dead.

Prosecutors accepted his guilty plea in August to the reduced plea of culpable homicide on the grounds of his diminished responsibility after it was concluded he was suffering from "an abnormality of the mind" at the time of the fatal attack.

A judge ordered Kerr on Tuesday to be detained in the high security state hospital in South Lanarkshire so medics there can treat him for a serious mental illness.

Lord Boyd made the ruling following a hearing at the High Court in Edinburgh on Tuesday after hearing from Dr Natasha Bilcliff, a consultant forensic psychiatrist at the high security psychiatric facility.

She said Kerr suffered from a "delusional disorder" and could only be treated at Carstairs, to which Lord Boyd agreed.

Lord Boyd said: "I am satisfied that medical treatment is available that would be likely to alleviate the symptoms or effects of the disorder and that if medical treatment was not provided there would be a significant risk to your health, safety or welfare and to the safety of other persons.

"I am also satisfied that this treatment can only be provided if you are detained in hospital. Such detention requires you to be under conditions of special security and that can only be provided in the state hospital.

"Accordingly, I shall make a compulsion order under section 57A of the Criminal Procedure Scotland Act 1995 ordering that you be detained in the state hospital together with a restriction order under section 59 of the act providing that the detention be without limit of time."

Kerr inflicted more than 70 wounds on his wife during the save attack and originally faced a murder charge when he appeared at the High Court in Glasgow but pleaded guilty to a lesser charge.

As he was being held by police after the killing, Kerr told officers: "I found out tonight they were not mine."

Prosecutor Jane Farquharson said he had "suspicions" a friend was the father of his children, adding: "A paternity test recently carried out... has since confirmed that Robert Kerr is the biological father."

Xin Xin had moved to Scotland from China about 15 years ago to study law at Aberdeen University. It was there she met Kerr, who was doing a computer course.

They got married in 2003. Kerr was latterly a lecturer at West College Scotland in Paisley while Xin Xin was training to be a translator.

They were described as a "quiet and private couple" and relatives were not aware of any problems between them.

Two weeks before the killing Kerr contacted his GP complaining of stress in respect of "work and personal issues" and said he was suffering from anxiety, insomnia and spoke about "paranoid feelings".

Then, on April 26, Kerr, wearing a dressing gown, fatally attacked Xin Xin before going to make himself a hot drink while she lay dead.

Just before midnight, Kerr rang 999 and admitted to emergency services: "I have just killed my wife. I murdered her in a stabbing frenzy."

Police discovered Xin Xin lying on the kitchen floor with a knife still in her body.

A post-mortem later revealed she had suffered a total of approximately 76 wounds.