A man on trial for the murder of Kenneth O'Brien, whose dismembered body was found in a suitcase in a canal, told gardaí he had been asked to murder Mr O'Brien's partner and had argued with him when he refused to do it.
Paul Wells Snr, 51, from Barnamore Park, Finglas, Dublin, admits firing the gun and dismembering Kenneth O'Brien's body, but denies a charge of murder.
He claimed he panicked and dumped the body parts after shooting him during a struggle.
The Central Criminal Court heard that Mr O'Brien's torso was later recovered from a suitcase found floating in the canal near Celbridge, Co Kildare in January 2016.
The court heard that Mr O'Brien had been in a long-term relationship with Eimear Dunne, and the couple had a four-year-old child.
He had been travelling back and forth from Australia for family occasions but in December 2015 had returned home to his partner and child for good.
Ms Dunne became concerned on 15 January when he did not return her text messages.
On Saturday 16 January she received two text messages from an unknown number purporting to be from Mr O'Brien.
The second message said he was leaving her and "heading for the ferry".
She suspected the text messages were not in fact from Mr O'Brien because of the tone, language and spelling used.
She contacted a number of family members, friends and colleagues including Mr Wells Snr, whom she knew, in an effort to find out what had happened to her partner.
The court heard Mr Wells Snr told Ms Dunne that Mr O'Brien had been having an affair in Australia and showed her photographs of a woman which were stored on a phone.
Ms Dunne reported her partner missing on 16 January, and the same day his torso was found wrapped in plastic in a suitcase taken from the canal by walkers in Celbridge.
More than a week later in follow-up searches, other body parts were found in a number of plastic bags which had been dumped in the canal and weighed down with bricks.
DNA tests confirmed it was his body and a post-mortem examination showed he had been shot in the back of the head and his body dismembered. The court heard a chainsaw was also found at Pike's Bridge in Co Kildare.
Prosecuting counsel Sean Gillane told the jury that after his arrest, Mr Wells Snr told gardaí that Mr O'Brien had wanted to return to Australia and wanted Ms Dunne to be murdered.
He said Mr O'Brien wanted him to murder Ms Dunne but he was unwilling to do so.
He told gardaí they had arranged to meet on 15 January for the transfer of a gun but he did not keep their appointment.
He also claimed Mr O'Brien showed up unexpectedly at his house that evening and the subject of him killing Ms Dunne again arose. He said there was a disagreement and a struggle and a gun fell to the ground.
He said Mr O'Brien was reaching for the gun when he grabbed it and fired it a number of times.
The jury heard that Mr O'Brien had recently returned home from Australia and that while he was living abroad, more than €40,000 had been transferred to Mr Wells' bank account.
The case continues before Mr Justice Paul McDermott and a jury.