A performing arts class at a young offender institution descended into violence which ended with an inmate being attacked with a table leg.
A court heard Connor Hendrie flipped over a table and ripped off one of its legs before swinging it “like a baseball bat”.
Hendrie carried out the attack after being confronted by rival inmates who were armed with an improvised knife and a cosh in the drama class at Wetherby YOI.
Leeds Crown Court heard Hendrie was aged 17 at the time of the incident on April 23, 2018.
The disturbance was caught on CCTV cameras as rival inmates fought with each other.
Austin Newman, prosecuting, said Hendrie was seen testing the stability of the table shortly before the incident to see if the leg could easily be removed.
The disturbance took place when two rival inmates entered the room.
Chairs were thrown and one the inmates backed away towards the door and produced a cosh fashioned from a knotted kettle flex.
Hendrie removed the table leg and used it to hit one of the inmates to the head as he was held by others.
Officers managed to break up the disturbance.
Hendrie was caught on camera “fist bumping” two of his friends shortly after the attack.
The injured inmate needed stitches to a face wound.
Hendrie, now aged 19, of no fixed address, pleaded guilty to attempting to cause grievous bodily harm.
The defendant has five convictions for violence dating back to 2015.
He was given a five-year custodial sentence for robbery when he was aged 15.
The court heard Hendrie has been convicted of violence offences against prison officers on two occasions since the attack at Wetherby.
Susannah Proctor, mitigating, said Hendrie had not planned the violence and had reacted as he anticipated being attacked.
Ms Proctor said Hendrie had been moved to a different institution and was behaving himself.
She added that Hendrie had been given enhanced prisoner status and was studying for qualifications in the construction industry.
Hendrie was given a two year sentence.
Judge Tom Bayliss QC said: “The aggravating factor is your record for violence and that it was committed in a prison environment.”