A firefighter attacked a fellow customer in a McDonald's restaurant when he allegedly made remarks about a woman's weight.
Damien Slevin (40) punched the man in the face, leaving him with a chipped tooth, after mistakenly believing the woman was under threat.
Slevin, who was off-duty at the time, was following his instinct to go to people's rescue when he "misread" the situation, a court was told.
Sentencing was adjourned for a victim impact statement to be made.
Slevin, of Oaklawn West, Leixlip, Co Kildare, pleaded guilty to assault causing harm.
Dublin District Court heard that the incident happened at McDonald's on Grafton Street last November 12.
A confrontation took place, during which the accused ran at the victim and punched him in the face, causing him to fall to the ground. The accused then fled the scene.
The whole incident was captured on CCTV, the court heard.
Nobody was identified as having carried out the assault but, on a later date, Slevin handed himself in to Pearse Street Garda Station and said he was responsible.
The victim suffered a chipped tooth and swelling to the right eye, the jaw and left elbow.
The court heard a medical report only referred to the elbow injury, and CCTV evidence was not available.
Judge Bryan Smyth said it would be helpful to view the CCTV to see "what went on".
Slevin had no previous convictions of any kind.
The case had essentially met a "dead end" before the accused presented himself to gardai and made admissions, his barrister Cathal O Braonain said.
Slevin claimed the victim had made "derogatory remarks in relation to the weight of one of the girls in his company", Mr O Braonain said.
The prosecuting garda said there were words "back and forth" between the groups.
Slevin believed that the victim had become aggressive to one of the women and made a threat to her.
However, when he saw the CCTV himself, he felt he may have made "a significant error of judgment", Mr O Braonain said. The defendant realised there was no physical threat to the woman in question.
The incident happened in the early hours of the morning after a long night of drinking on everybody's part, added Mr O Braonain.
Slevin worked as a firefighter and was of good character.
"He would have an instinct of going to people's rescue when he perceives that they are threatened," counsel said.
He asked the judge to consider leaving the accused without a conviction in light of the circumstances and the fact that it was a "misreading of the situation" rather than an unprovoked attack.
"The work he does would carry an instinctual level of wanting to protect those around him and that manifested itself in an unfortunate way on the night in question," he added.
The case was adjourned to a date next month and Slevin was remanded on continuing bail.