The self-confessed killer of Swedish Foreign Minister Anna Lindh has told a Stockholm court that voices in his head made him attack the politician.
Mijailovic told police that Jesus had told him to kill Ms Lindh
Mijailo Mijailovic rocked slightly in his chair as he described how he saw Ms Lindh out shopping and "couldn't resist the voices".
Mr Mijailovic's lawyer said his client, who denies murder, admitted stabbing Ms Lindh, but did not intend to kill her.
Ms Lindh's death prompted a public outpouring of grief in Sweden.
The foreign minister, one of Sweden's most popular politicians, was stabbed as she was shopping in a Stockholm department store on 10 September last year. She died in hospital the following day.
The trial was being broadcast live on Swedish radio, with millions of people expected to tune in. But after a break for lunch, the court ruled that the cross-examination of Mr Mijailovic should not be broadcast after a request from the accused.
Ms Lindh, a leading pro-Euro campaigner, was killed just days before a divisive referendum in Sweden on whether to join the single European currency.
But Mr Mijailovic, 25, told the court he did not single out Ms Lindh because she was a politician.
"I'm not interested in politics," he said. "It could have been someone other than Anna Lindh. I have nothing personal against Anna Lindh."
Mr Mijailovic said he had left home with a knife because he felt threatened. He said he ended up wandering aimlessly around the department store before he saw Ms Lindh but rejected any suggestion that he had been looking for her.
Prosecutors say the attack was planned and believe Mr Mijailovic stalked the politician for 14 minutes before stabbing her.
Mr Mijailovic told the court that when he first saw Ms Lindh in the shop, he heard voices that told him to attack her.
Anna Lindh: Tipped as a future prime minister
"I could not withstand the voice - it said 'attack, attack'," he said.
He said the attack "lasted only a few seconds".
"It's like a nightmare," he said. "It happened so quickly. I took out the knife, then I attacked her. I don't know how many times I stabbed."
Mr Majailovic said he "did not aim" for any particular part of her body.
He said that after the attack, he was worried about what had happened.
"I was hoping that she would survive," he said.
He said he was "feeling really bad and hadn't slept for days" before the incident.
Mr Mijailovic gave a rambling confession to police last week, saying Jesus had told him to stab Ms Lindh.
His defence lawyer, Peter Althin, told the court he wanted the charges reduced from murder to manslaughter.
Chief prosecutor Agneta Blidberg told the court that she would prove Mr Mijailovic had every intention of killing Ms Lindh.
If convicted of murder, he faces a life sentence, which in Sweden is usually about 15 years.
At the end of the trial early next week, Mr Mijailovic is expected to undergo four weeks of psychiatric assessment, after which a verdict can be passed.