A jailed man with a "significant history of violent offences" assaulted a prison guard while he was being held at Dublin's Criminal Courts of Justice.
Celyn Eadon (28) lashed out while in custody, swung punches and inflicted scrapes on the prison officer's arms.
Judge Colin Daly jailed him for four months.
Eadon, from Derrycrieve, Islandeady, Castlebar, Co Mayo, pleaded guilty to assault causing harm to the prison guard on May 18, 2018.
Dublin District Court was told the accused was in the custody area when he began swinging his fists in the direction of the victim.
He had to be restrained and lashed out as he struggled on the ground, the court was told.
The prison officer, who suffered superficial scrapes and scratches to his arms, did not wish to make a victim-impact statement.
The court was told Eadon had 12 previous convictions for offences including multiple counts of assault. He was from the west of Ireland and leading an "entirely isolated existence" in custody, his solicitor Damien Coffey said.
Eadon began dabbling in drugs at a young age and drug use "rapidly took over his life", Mr Coffey said. He had experienced a lot of difficulties in Wheatfield Prison and some of his previous convictions were for assault while in custody.
Eadon was now in a protection unit at the Midlands Prison and he was "much improved", Mr Coffey said.
He had "difficulties in dealing with prison officers" and accepted his responsibility for the assault.
Judge Daly said the offence was at the mid point on the scale and he would give the accused credit for his guilty plea.
However, he noted Eadon had a "significant history of violent offences".