A Dublin man who claims he accidentally killed his friend as they joked around with a loaded gun has told the victim's family that he loved him "like a brother".

Dean Short of Lally Road, Ballyfermot, pleaded guilty to the unlawful killing of 18-year-old Paul McCarthy at Myra Close, Emmet Road, Inchicore, on 9 May 2011.

Detective Sergeant Michael McNulty told Dublin Circuit Criminal Court he was called to the scene shortly before 3pm on that day and found Mr McCarthy lying injured on the floor of his friend's bedroom with a single gunshot wound to the head.

The bullet had entered the right upper side of his face and come out the back of his skull.

He was taken to hospital where his condition deteriorated and he was pronounced dead a few hours later.

John Byrne BL, prosecuting, said earlier that day, five teenage friends had gathered in one of their bedrooms when Mr McCarthy took a gun out of a bag and started waving it around and laughing.

Short later told gardaí his other friends were also laughing and saying "Get it out of me face". Mr McCarthy said in reply "Boys, it doesn't work, relax" before putting the gun down on the bed.

Short said "everyone was laughing, it was all a joke," and that he picked up the gun and pointed it at Mr McCarthy saying "How d'you like it now Paulie," before the gun went off in his hand.

"The thing just went off, like, and I froze, everything froze. The gun dropped out of my hands. I got down on my knees and knelt over Paul begging him to get up," the 21-year-old said.

He said he ran out of the room with the other boys, all screaming, and then went back upstairs where he said Mr McCarthy was "just lying on his own, shaking."

"I said 'I have to go, I'm sorry,' and then I grabbed the gun and ran out the door and legged it and dropped the gun into a garden."

Det Sgt McNulty said Short presented himself at Kilmainham Garda Station the following day with two of his friends who had been at the scene.

Short was arrested and underwent a total of 12 interviews during which his account of events remained consistent, and similar to those given by the three other witnesses.

He told gardaí, "I shot my friend by accident, I didn't mean to, I'm so, so sorry," describing Mr McCarthy as his best friend.

Michael O'Higgins SC, defending, referred to a private letter that his client had written to the McCarthy family telling them that he was "very, very sorry" and he had loved the victim "like a brother".

In a victim impact statement read out in court, the McCarthy family said Paul was a "generous, gentle, loving boy" and very much loved as the only brother of eight sisters.

The court heard that the Mr McCarthy was funny, witty and often bragged about his football skills with St Patrick's Athletic.

The family said they are now living "an emotional rollercoaster" and that some of his sisters are being treated for depression while his mother has had a nervous breakdown since the death of her only son.

They said they have found themselves "not being able to trust anyone" and said they still do not know the answer as to what happened on that day.

Mr McCarthy's mother said she had to move out of the area following her son's death and she does not think she will ever accept his loss.

The family said they hope now to get some closure and remember Paul as he deserved to be remembered.

Mr O'Higgins said Short is acutely aware of the pain and suffering he has inflicted on the McCarthy family and that he feels particularly sorry for Paul's mother.

He said his client apologises unreservedly and would do anything to reverse what happened.

A psychiatrist's report diagnosed Short with post-traumatic stress disorder and said he suffered nightmares and had a huge sense of guilt, remorse, and despair.

A clinical psychologist described Short as a "good person and a gentle spirit" who was "completely overwhelmed by the situation he finds himself in, and has difficulty coming to terms with the awful consequences of what he has done."

The court heard that Short has 28 previous convictions, mostly for road traffic and public order offences.

Letters were presented to the court from the Probation Services describing Short as a personal and co-operative young man, while elderly neighbours said he was always doing small kindnesses for them like putting out the bins, cutting the grass and getting shopping.

Judge Mary Ellen Ring said she was anxious not to prolong the suffering for the McCarthy family and for all involved in the case.

But, she wanted to bring a decision that was in accordance with the law and would be seeking guidance for dealing with a case such as this.

Short was remanded in custody for sentencing on 2 December.