A Dublin man who took part in a violent city centre attack, in which two young men were assaulted with a hammer and an iron bar, has been ordered to carry out community service.

A previous guilty plea to assault was withdrawn and would instead be taken into account, prosecution barrister Anne Rowland told the court.

Judge Petria McDonnell imposed a nine-month jail sentence, which she suspended on the condition that Murray carries out 200 hours of community service.

A bus driver filmed the attack on his mobile phone and this footage was shown in court.

It showed Murray, along with three of his friends, attacking victims Lee Whelan and Dylan Campbell in the street.

Garda Wayne Donnelly told the court he was on patrol on the night in question, when he saw a fight between a group of teenagers on D'Olier Street.

The court heard Murray and three of his co-accused, who can't be named as they are still before the courts, were sitting in a parked car when a fight broke out between two young women known to the group.

Surgery

The men broke up the fight between the women, before turning on Mr Whelan and Mr Campbell, who happened to be walking by.

Mr Whelan was knocked to the ground, before two of Murray's co-accused returned to the boot of the car and grabbed a hammer and an iron bar.

Mr Campbell was hit with the hammer, while Mr Whelan was hit with the iron bar. He was in a semi-conscious state when Gda Donnelly arrived on the scene, the court heard.

Mr Whelan suffered a wound to the back of his head, while Mr Campbell also suffered a head wound and a hand injury that required surgery.

Murray, who was 19 at the time, has previous convictions for road traffic offences and the unlawful seizure of a vehicle, Ms Rowland said.

Defence barrister Kenneth Kerins said Murray was a "peripheral character" in the fight. While the video footage showed him throwing punches, he did not arm himself with a weapon during the incident.

"He is not someone with a very chequered past," Mr Kerins said. "He made a rash decision on this night [to involve himself] and it's going to cost him dearly."