But he has reportedly said: “There is nobody else who can have done it.”
According to Swedish newspaper, Aftonbladet, the dead man was attacked with a knife during a dinner party.
The accused man grabbed a knife and thrust it into the chest of the man who sat opposite him, according to the newspaper. The man died immediately.
Then the suspect walked the short distance to his home, picked up an axe, and went into another neighbour's house, where he attacked a couple.
It is thought that the attacker had been mentally ill for some time and had just been released from psychiatric care at the time of the incident.
He had been invited to his friend's home, along with his family, as a gesture of support.
The accused had been suffering from a persecution complex and is also reported to have suffered several psychoses.
The start of the man's trial has been deferred to March 18th.
Onsala is a wealthy area 45kms south of Gothenburg with more than 11,000 residents. The Onsala peninsula is the largest in Sweden.
It is home to the Onsala Space Observatory.