The man admitted to stabbing his next-door neighbour’s father, the jury heard.
The jury was told they will hear evidence from a consultant psychiatrist that at the time of the killing the man was suffering from acute schizophrenia.
Dragos Nica, aged 30, of Mourne Park, Skerries, Co Dublin, has pleaded not guilty by reason of insanity to the murder of Michael Gannon, aged 55, at Mourne Park on November 14, 2013.
The jury was told Mr Nica admits to stabbing Mr Gannon and admits that Mr Gannon died as a result of the stab wound.
Patrick Treacy, prosecuting, told the jury it will have to decide whether Mr Nica is guilty by reason of insanity.
Sergeant David Kemp yesterday told the jury that, on the afternoon of November 14, Mr Gannon was babysitting his daughter Jade’s two children and a neighbour’s child at Jade’s house in Mourne Park, next door to Mr Nica’s house.
The court heard that Mr Gannon was making dinner when one of the children told him a man was looking in the window of the living-room.
Mr Gannon went to investigate, opened the door, and the accused was there, the court was told.
Sgt Kemp said Mr Gannon was stabbed and died within a few feet of the incident.
The children ran to a neighbour and the gardaí were called, he said.
After the incident, Mr Nica returned to his own house and was “shouting and roaring”, Sgt Kemp said.
“Some witnesses said that he was shouting something about having lumps on his body. He said he had these lumps and they were poison and that he had to do it. He identified Jade Gannon as being the cause of the poison,” said Sgt Kemp.
The court heard that Mr Nica had known Jade Gannon before the killing.
Sgt Kemp said: “There was some sort of relationship between them. They were friends. Mr Nica minded her kids on occasion. He did some minor errands on her behalf. Mr Nica asserted there was a physical relationship between them.
“He asserted he had strong feelings for her.”
The jury heard that Mr Nica called 999 and spoke with a civilian call taker, reporting that he had stabbed his next-door neighbour and that he had been poisoned by the man’s daughter.
Gardaí arrived at Mr Nica’s house and met his mother, who informed them that he had locked himself in his bedroom and said he was going to die, the court heard.
Sgt Kemp said that after Mr Nica was arrested, he told the guards: “She zapped me on my wedding finger with poison. It’s all up my left arm.”
He told the arresting officers it was Mr Gannon’s daughter who poisoned him and that he “had to do it”, the court heard.
Sgt Kemp told the jury that Mr Nica said: “The poison is killing me. I stabbed him to stop the poison.”
During cross-examination, Sgt Kemp told Jonathan Kilfeather, defending, that statements from Mr Nica’s parents indicated suspicions as to whether their son was taking his medication.
The trial continues.