An NHS trust has been criticised for failing to meet the healthcare needs of prisoners at London's Thameside prison.
A letter released to the BBC shows Serco, which runs the south east London jail, raised serious concerns about the quality of healthcare provided.
One prisoner at Thameside wrote to the BBC saying he was not receiving his prescription of pain medication.
Oxleas NHS Foundation Trust said it had reduced its vacancy rate and had addressed Serco's concerns in full.
The Prisoner Advice Service (PAS), which provides legal support to adult prisoners, said it had regularly been asked to assist prisoners with complaints concerning Oxleas failing to provide medication such as prescription pain relief, blood pressure tablets and diabetic medication to prisoners.
'Complaints go unanswered'
The letter, sent by Serco director of Thameside Prison Craig Thompson to Keith Soper, director of forensic and prison services at NHS Oxleas, in August last year, formally raised concerns about the quality of healthcare at the prison due to chronic staff shortages, and asked for an improvement plan.
"Whilst I am acutely aware of the challenges faced in relation to attracting and retaining clinical staff, the current risk to the establishment is increasing and needs to be considered urgently," the letter continued.
In a long response letter, Mr Soper accepted the concerns, saying staff shortages were a "consistent issue", and that more inmates had serious health concerns than the trust had anticipated when it accepted the contract to provide services in 2015.
The Prisoner Advice Service (PAS), which provides legal support to adult prisoners, said the letter reflected its own experience of healthcare at Thameside, with the charity helping many prisoners there raise complaints.
Laura Orger, from the PAS, who works with prisoners at Thameside, said a number of inmates there had serious health conditions and protested repeatedly at the healthcare provision they received, including failing to be provided medication.
"This often causes individuals severe pain, distress and sometimes self harm and a deterioration in their mental health," she explained.
"We have also been made aware by prisoners that their healthcare complaints go unanswered and unresolved."
'Don't get sick in Thameside'
One prisoner who wrote to the BBC said he had made a formal complaint to the Prisons and Probation Ombudsman about his treatment.
He alleged the healthcare provider had failed to give him his full prescription, being given less medication than had been prescribed by a consultant and leaving him in extreme pain, and that he had to get his own medical records posted to the prison because staff could not find them.
He also claimed nursing staff at the prison were too physically unfit to quickly reach prisoners who have medical emergencies, and said prisoners have joked "Don't get sick in Thameside or you will end up dead before you get seen to".
A spokesperson for NHS Oxleas Foundation Trust said the Serco letter received a full response, and that respective directors met regularly to discuss operational challenges and joint working.
It said its vacancy rate had reduced significantly and it had no reports of staff being delayed in reaching a prisoner in an emergency, although it said there were often considerable distances and multiple locks to negotiate.
It said it would encourage the prisoner who wrote to the BBC to contact the trust's head of healthcare who would go to see him.
A spokesperson for Serco, which manages the prison on behalf of the MoJ, said it had no involvement in the contracting for healthcare, as it was organised through the Ministry of Justice.
The ministry refused to comment.