A Mayo man said that he assaulted and killed two elderly men because he thought they might be child molesters as they were living together.
The memo of Alan Cawley's interviews with gardaí were read to the jury in his murder trial at the Central Criminal Court this morning.
The 30-year-old is charged with murdering Thomas Blaine and John Blaine, also known as Jack Blaine.
Both had illnesses, including speech impediments.
Mr Cawley, of Four Winds, Corrinbla, Ballina, Co Mayo, has admitted killing the brothers.
However, he has pleaded not guilty to murdering them on 10 July 2013 at New Antrim Street in Castlebar.
Garda Hugh O'Donnell testified that he interviewed Mr Cawley following his arrest.
He told Denis Vaughan Buckley SC, prosecuting, that the accused had initially denied involvement.
However, he said his memory came back when gardaí showed him CCTV footage of him entering the Blaine home with Jack Blaine.
He said he had gone upstairs looking for sleeping tablets or drugs, but could not find any.
He came back downstairs and the man with whom he had entered the house was in the kitchen.
"He was very clingy and he wouldn't speak properly so I asked: 'What's wrong? What are you looking for?'" he said.
"I felt the best idea was to show the man that men can't always get what they want, ... that if I inflicted some pain it would make up for everything in the past."
He said he beat him with a stick and made his way to the front door. However he then saw another man in a bed at the front of the house.
"I thought that if they were living together, maybe that the two of them were child molesters," he said.
He said he hit this man with a stick about 25 times before returning to the first man.
He added that he also poured boiling water on the man's crotch.