A judge threatened to hold a public order offender in contempt of court after the accused broke wind loudly and fell asleep.
Jason Ellis (40) was warned by district court president Judge Colin Daly after he disrupted a hearing while he waited for his own case to be dealt with.
Ellis apologised and said he was being treated for cancer, but Judge Daly said he did not believe "for a moment" that the accused had that little control over his bodily functions.
Ellis purged contempt with his apology, and the judge warned him: "Don't let that happen again."
The accused, of Miltown Estate, Ashbourne, Co Meath, had pleaded guilty to public intoxication on board a train at Heuston Station last Dec- ember 18.
After hearing evidence of the public order incident, the judge fined Ellis €200, which was separate from the contempt issue.
While sitting waiting in the public gallery, Ellis was heard to break wind.
Judge Daly told him he would hold him in contempt and put the case back to later in the day's list for a hearing.
Ellis was not placed in custody and remained where he was.
When the case was called again, the judge asked if there was anything that Ellis wished to say.
Defence solicitor Colleen Gildernew told the judge that her client "does wish to apologise."
Ellis suffered badly with medical problems after being diagnosed with cancer last year, she said.
"Is it cancer medication that caused him to fall asleep in court?" the judge asked.
Ms Gildernew said she knew the accused was "breaking wind in court and may have disrupted proceedings".
"Did he make any effort to go outside and look after himself?" the judge asked.
"I don't believe for a moment he has that little control over his own bodily functions.
"I don't believe his demeanour in court today has anything to do with cancer medication."
The judge said he knew people on cancer medication, and they did not behave in that manner.
Being ill did not mean you had no consideration for other people in court, he added.
Ms Gildernew said Ellis wished to address the court.
"I'm very sorry for what happened," the accused said, adding that he had been "in denial" about being sick while he was in court.
"Don't let it happen again," Judge Daly said.
"When you are in court you behave yourself like a normal person."