A man who 'mooned' gardaí while shouting "I have five kilos of heroin up my hole" has been jailed after a judge also heard he used his own blood to write an abusive message to a garda - on the walls of a station cell.

Daniel Huggins, 29, pleaded guilty to two public order offences and to criminal damage on October 30 last year, telling Clonakilty District Court he had been "out of order" in the course of an incident during which he also threatened to rape the mother of one of the officers arresting him.

But he denied two charges of section 2 assault on different gardaí - one incident in which he threw a balled-up piece of bloodied tissue in the face of one garda, and later when he smeared the stab vest and fleece of another garda with his blood.

Judge James McNulty heard that Mr Huggins from Mallabracka in Dunmanway in County Cork, was found by gardaí as they responded to a call from the Shamrock Bar in the town.

Garda Kevin Kennedy said Mr Huggins was in the pub in the snug area at 7.50pm that night, that his left arm and some of his fingers seemed to be bleeding and that a panel of glass in an alcove had been broken.

Garda Kennedy said Mr Huggins was intoxicated and shouting at gardaí "search me" and "arrest me".

He then walked out of the bar with his two hands in front of him, but Garda Kennedy said that, when he was outside, Mr Huggins then dropped his trousers, exposing his buttocks, and shouted: "I have five kilos of heroin up my hole".

The court heard that members of the public saw what occurred.

Mr Huggins was arrested and according to Garda Kennedy and Garda Martin Cronin, he said he would bite off the ear of one of the gardaí. Garda Kennedy said Mr Huggins shouted, "I will fuck you up the ass" and Garda Cronin said Mr Huggins had crudely threatened to anally rape his mother.

Judge McNulty was told that once at Clonakilty Garda Station, Mr Huggins was still very agitated and after he had cleaned his cuts, he balled up the tissue and threw it at Garda Kennedy, hitting him in the face.

Sgt Alec Butler told the judge at this point he asked Garda Kennedy to leave the area and he tried to calm down Mr Huggins.

En route to a cell Garda Cronin said Mr Huggins tried to smear his neck and back with blood but that he ducked, meaning the blood went on his fleece and stab vest.

"It was a deliberate act," Sgt Butler said. Later it was found that Mr Huggins had written 'fuck you Kevin' in blood on the cell wall.

Solicitor for Mr Huggins, Ray Hennessy, queried why medical attention was not called for earlier once his client had arrived at the garda station, and also queried whether the incidents with the tissue and alleged smearing constituted assault.

Mr Huggins admitted he had been " "totally out of order" but said he did not believe he assaulted the gardaí and claimed Garda Kennedy had been "hassling" him prior to the incident.

Judge McNulty convicted Mr Huggins of both assaults, handing him two six-month jail sentences.

He also convicted him on the other charges, sentencing him to six months for criminal damage and two months in prison for the more serious public order offence, taking the other into account.

Recognisance for appeal was set at Mr Huggins's own bond of €100, no cash required.

This story has been amended