A Taser stun-gun has been used by police to disarm a female prisoner who held a pair of scissors to the throat of a prison officer.
Pcs David Morgan and Claire Reed were called to Durham University Hospital early on Tuesday morning.
The 22-year-old inmate from Low Newton Prison was being treated for wounds to her thigh and groin, thought to have been self inflicted.
She was immobilised and later returned to the prison, Durham Police said.
Police chiefs have praised the actions of the armed officers.
A spokesman said the prisoner became agitated in the hospital's accident and emergency unit.
She suddenly grabbed the female prison officer, to whom she was handcuffed, and demanded drugs.
Pc Morgan, 35, asked hospital staff to supply him with some tablets, which were aspirin, and as the prisoner reached for them, officers fired the stun-guns.
Assistant Chief Constable Michael Banks praised the officers, adding that it highlighted the dangerous and difficult situations faced by firearms officers.