The trial of a man accused of murdering his gay lover, drinking his blood and drawing a pentagram with gore on his wall has begun in Sweden. The mentally ill man has admitted manslaughter but denies murder.

The 23-year-old is charged with murdering his 32-year-old lover, named only as 'Olle', by slitting his throat with a knife at his apartment in Lidingö island in Stockholm in June.

A court in the Swedish capital heard that the man, who suffers from a psychiatric illness, admits that he committed manslaughter but not murder. He told police that voices told him to commit the crime.

"In the light of his psychological ill health this is a deed that can only be classified as manslaughter," his lawyer Jonas Granfelt told the court, Swedish tabloid Aftonbladet reported.

The man, who was not named, told the court that after killing the man he had been compelled to drink the victim's blood and draw the pentagram, which is associated with magical and occult rituals. "When I saw the blood I had a vision that I had to drink it," he said.

However, prosecutor Pär Andersson said that information from the man's computer indicated he had planned the killing, and had Googled the search terms 'cut throat' and 'sentry killing', or how to cut someone's throat from behind, in the days before the crime. Andersson said that he had killed the victim in order to cover up their relationship, and planned to appeal the psychiatric evaluation.

"I believe that it is a fairly common argument in cases like this that you hear voices of various kinds. A more likely motive may have been to hide this sexual relationship they had. A relationship which he, in several police interrogations, denied they had had before he confirmed it and said he was ashamed of it," said Andersson.

The trial continues.