Prison inmates downed illicit alcohol before jumping on to netting designed to stop prisoners falling from the top storeys of cell blocks.
Adam Windass, 32, Ryan Skelton, 28, and Shaun Smith, 36, staged the dramatic three-hour stand-off at HMP Humber after they spent the day drinking.
And two of the inmates had ligatures around their neck as they threatened that if they fell and hanged themselves the prison guards were to blame.
As prison officers armed with riot shields tried to get the men back over the railings one of the men wielded a table leg.
The three men were just inches away from the edge of the netting when officers deployed a Pava (pepper) spray which left them rolling on the netting with their hands to their face.
Desperately trying to find the edge of the net one of the men, who had just seconds before been trying to hit the officers with a table let, reached out towards them for help.
Eventually two prison officers leap out on to the net and grab the men before wrestling them through the railings and away from the net
He was immediately pulled back on to the cell landing as officers descended on him to ensure he could not lash out.
But the other two inmates remained on the netting and kicked their legs out towards the edge of the net to stop officers getting to them.
Eventually two prison officers are forced to leap out on to the net and each grab one of the men before wrestling them through the railings and away from the net.
Hull Crown Court heard last week how it had been part of a three-hour stand-off.
The men had spent the day drinking before they and two other men kicked off. Prison officers in helmets and riot shields rushed to the scene.
Adam Windass (right), 32, Ryan Skelton (left), 28, and Shaun Smith, 36, staged the dramatic three-hour stand-off at HMP Humber after they spent the day drinking.
The two other men eventually gave up but Windass, Skelton and Smith continued their violent stand-off, as shown in the video above, and put ligatures around their necks and threatened to jump if officers stepped in.
The violence took place on May 11, 2017, and it is unclear what triggered the stand-off other than the fact the men had been drinking.
All three men appeared at Hull Crown Court for sentencing last week after previously admitting affray.
Smith, 36, of Hornby Grove, east Hull, was also sentenced for two counts of dealing class A drugs which he committed after being released from prison.
Mike Greenhalgh, prosecuting, said: 'The men accessed the netting area between the balconies which stops prisoners from falling.
'They were all described as highly intoxicated after drinking a fermented liquid.
'They attacked the prison officers who tried to remove them, threatening violence, spitting on them and then striking the officers with handmade weapons, namely table legs.
Two of the inmates who have ligatures around their neck threaten to jump and hang themselves
'The three men