The Central Criminal Court has heard a Dublin teenager on trial for the murder of Melanie McCarthy-McNamara boasted in letters from prison about the shooting of the 16-year-old.

Daniel McDonnell, 19, of Brookview Lawns in Tallaght denies murdering the teenager at Brookview Way on 8 February 2012.

Prosecuting counsel Brendan Grehan told the jury the prosecution's case will centre on what it says is evidence of the accused man boasting in letters from prison and in graffiti on a cell wall about the shooting.

Ms McCarthy-McNamara died from gunshot wounds to the head after a shotgun was fired into the back of a car in which she was sitting with her boyfriend and another man.

The prosecution said Mr McDonnell wrote comments on a cell wall about Ms McCarthy-McNamara's boyfriend which said: "I will do 25 to life, two in the head your b**** is dead".

It is also alleged that he wrote in a letter "this war ain't stopping take my words (sic) for it close range head shots that is what I'm going for. If I get High court bail I swear on my whole family they will be in the ground.

The jury was told he added: "Silly mother*** pulled out a hammer ... I left his b**** all over the Sunday World's front page ha ha...

"I'll never forget that mug roaring, the best night of my life."

Mr McDonnell is also alleged to have written a letter to his former girlfriend that said: "I never thought I would turn out like this I don't know how I am still going out with you, I feel like a scumbag."

The letter is alleged to have added: "I don't know what got into my head that week s*** f***** me in the head.

"That other thing wouldn’t have happened if I had known she was in the car.

"It was meant for that other smell bag he won't get away with bullying my Ma ... I'm the only one who stuck it up to them remember that."

Mr Grehan said the killing had all the hallmarks of a highly organised enterprise involving a number of people.

The issue for the jury was to decide if the accused man was involved. The jeep, number plates, and the weapon used in the attack had all been stolen.

It was the prosecution's case that the clear intent of firing a shotgun into a car at close range can only have been intended to cause, if not death, at least serious injury.

He said Ms McCarthy-McNamara may not have been the intended victim but the law is clear that it is not necessary that the person killed was the target, it was simply necessary that there was an intention to kill or cause serious harm.

He said the real issues would be whether the accused was involved in that particular enterprise and the law says where there are a number of people involved in an enterprise with a shared intent, not just the person who pulls the trigger but all of those involved are equally responsible for the consequences.

He said the prosecution will present this evidence over the course of the trial and the jury would consider it in combination and how they were related to the guilt of the accused man.

Mr McDonnell denies the charge.

The trial continues before Mr Justice Paul Carney and a jury of six men and six women.