One of three men accused of murdering an elderly man received a text message saying the deceased was a rapist before he was allegedly beaten to death, a jury has heard.
The court also heard the 64-year-old deceased had never come to the attention of gardaí and that there were no "rumours" relating to him that would concern gardaí.
Matthew Cummins (aged 22) of Churchview Heights, Edenderry, Co Offaly, Sean Davy (aged 21) of Clonmullen Drive, Edenderry, Co Offaly and James Davy (aged 25) of Thornhill Meadows, Celbridge, Co Kildare have all pleaded not guilty to murdering 64-year-old Thomas 'Toddy' Dooley at his home in Sr Senan Court, Edenderry, Co Offaly on February 12, 2014.
Detective Garda Joe Hughes told prosecuting counsel Patrick Treacy SC that during an interview with Matthew Cummins on June 10, 2014 at Tullamore Garda Station, gardaí asked Mr Cummins why Toddy Dooley was killed.
Mr Cummins said that he asked Sean Davy why he had attacked the elderly man, and Sean Davy replied: "He raped my cousin."
The court has already heard that Mr Cummins told gardaí he saw Sean Davy hit Mr Dooley repeatedly with a baseball bat.
Gardaí told Mr Cummins that his co-accused James Davy had received a text message from Chloe McBride, a girl they both knew as Toddy Dooley's granddaughter.
The text read: "Toddy a rapist. I never going there again."
Gardaí said this suggested a motive for the attack and that it was pre-planned.
Mr Cummins said he didn't know anything about the text and that he had no idea Mr Dooley would be attacked.
He said he thought they were going in to have a few drinks.
"I didn't know if they had a plan. I didn't see it coming," he said.
Det Gda Hughes agreed with Caroline Biggs SC, representing Mr Cummins, that Toddy Dooley had never come to the attention of gardaí.
She said he was "soft" and that young people, particularly teenagers, would often gather at Mr Dooley's house and "take advantage" of him.
"His house was being used," said Det Gda Hughes.
The jury also heard interviews that Mr Cummins gave to gardaí at Tullamore Garda Station in February 2014.
Det Gda Hughes agreed with Mr Treacy that during those interviews Mr Cummins said he was afraid to come forward following the killing. Gardaí asked him why he didn't call an ambulance.
He said he was too afraid.
When asked if he had told his parents he said: "No. I didn't want them to think their son was a murderer."
The trial continues before Justice Margaret Heneghan tomorrow.