A Polish male prostitute who killed a university lecturer in a knife attack has been convicted of culpable homicide.

A jury found Pawel Rodak guilty by majority verdict of stabbing Roger Gray 114 times.

Mr Gray, 64, died from massive blood loss and a deep wound that penetrated his heart.

The High Court in Livingston was shown an eight-inch kitchen knife which was thought to be the murder weapon.

After the killing, Rodak then ransacked Mr Gray's flat in upmarket Merchiston Crescent, Edinburgh.

Rodak, 20, told psychiatrists he carried out the attack because he felt "uncomfortable" at being asked to engage in rough, sadomasochistic sex.

He refused to instruct defence counsel at the start of the 13-day trial and – without legal representation– offered to plead guilty to murder.

The Crown rejected the plea on the grounds that Rodak had a psychiatric history that suggested he may have had diminished responsibility at the time of the killing.

Temporary judge Michael O'Grady appointed Donald McLeod, QC, as "amicus curiae" (a friend of the court) to represent Rodak, who was found guilty of assaulting Mr Gray at his home on March 18 or 19 and striking him on the head and body with a knife or similar instrument and killing him.

He was found guilty of the lesser charge of culpable homicide on the grounds of reduced responsibility.

An allegation that he tried to defeat the ends of justice by concealing clothing at his flat, disposing of items from the murder scene, and endangering life by leaving a lit candle near to escaping gas in Mr Gray's flat was dropped by the Crown.

During the trial the jury heard evidence that Rodak had advertised on a gay website.

He told psychiatrists he had decided to become a male prostitute and charge for sex because he had no money.

He said his first sexual experience had been at the age of 15 when he was violently assaulted by a 26-year-old man in Poland.

He claimed Mr Gray had offered to double his fee if he inflicted pain on him with a whip and had slapped him on the face.

Consultant psychiatrist Dr Fionnbar Lenihan, 45, told the court: "Mr Rodak went to the kitchen to get his jacket and leave. Mr Gray followed him and became angry.

"He said Mr Gray pushed him and hit him again and said: 'I'm paying you'. Mr Rodak then picked up a knife from a table and said: 'I go wild, you know'.

"When I asked him what was going through his mind, he said: 'I felt angry and frightened'."

Dr Lenihan said the traumatic rape – about which Rodak still has nightmares and flashbacks – led him to diagnose that he was suffering from Post Traumatic Stress Disorder (PTSD).

He said: "The situation on the night of Mr Gray's death re-enacted elements of the rape and caused Mr Rodak to react in this way.

"It's my opinion that Mr Rodak fulfils the criteria for a diagnosis of PTSD."

Consultant forensic psychiatrist Dr John Crichton, who works alongside Dr Lenihan at the Orchard Clinic Medium Secure Unit in the Royal Edinburgh Hospital, said Rodak had admitted stabbing Mr Gray 110 times, close to the actual number of wounds found on the body.

However, in his opinion the accused was not suffering from PTSD when he carried out the killing. If he had the condition, Dr Crichton said, he would not have put himself in a position of reliving the traumatic experience of being sexually abused by an older man.

Mr Gray was a part-time lecturer in actuarial mathematics and statistics at Edinburgh's Heriot-Watt University.