A prisoner was caught with a mobile phone at Armley jail after he barricaded himself inside his cell during a protest.
Officers forced their way into Zachariah Morris's cell and found the device during the incident at the Leeds jail on February 23 this year.
Leeds Crown Court heard a senior officer went to the defendant's cell on C Wing at 4.30pm after a report of him making threats to barricade himself into his cell because he was receiving threats from other prisoners.
Robert Galley, prosecuting said officers negotiated with Morris before gaining entry to the cell.
Morris was then told to pack his belongings as he was being moved to another wing at the prison.
The 23-year-old was searched and the mobile phone and an improvised smoking pipe were found in his sock.
Mr Galley said the mobile phone was also fitted with a sim card.
Morris, of no fixed address, pleaded guilty to possessing a mobile phone in prison.
He was serving a 32-month prison sentence at the time of the offence.
Morris has previous convictions for violence, making threats with a knife and failing to comply with community orders.
Mr Galley read a statement to the court on behalf of the prison governor, outlining the negative impacts of contraband mobile phones in jail.
He described how they led to vulnerable inmates being targeted by other prisoners.
Robin Freize, mitigating, said Morris and his cellmate had been protesting over threats they had received from other prisoners on the wing.
Mr Freize said some of the threats involved him being forced to look after the mobile in his cell.
He said: "It is an unusual case of its kind.
"It did not belong to him. There was a download of the phone and there was nothing to suggest that he was using it for any particular purpose."
The court heard Morris is due to be released from custody in April next year.
Judge Geoffrey Marson, QC, ordered that eight months be added to the sentence that Morris is currently serving.