NAIROBI, Kenya -- Doctors at Nairobi's Kenyatta National Hospital have told Robert Wanyonyi there's nothing more they can do for him. Yet more than a year after he first arrived, shot and paralyzed in a robbery, the ex-shopkeeper remains trapped in the hospital.

Because Wanyonyi cannot pay his bill of nearly 4 million Kenyan shillings ($39,570), administrators are refusing to let him leave his fourth-floor bed.

At Kenyatta National Hospital and at an astonishing number of hospitals around the world, if you don't pay up, you don't go home.

Get Breaking News Delivered to Your Inbox

The hospitals often illegally detain patients long after they should be medically discharged, using armed guards, locked doors and even chains to hold those who have not settled their accounts. Even death does not guarantee release: Kenyan hospitals and morgues are holding hundreds of bodies until families can pay their loved ones' bills, government officials say.

Hospital detentions found in more than 30 countries

An Associated Press investigation has found evidence of hospital imprisonments in more than 30 countries worldwide, according to hospital records, patient lists and interviews with dozens of doctors, nurses, health academics, patients and administrators. The detentions were found in countries including the Philippines, India, China, Thailand, Lithuania, Bulgaria, Bolivia and Iran. Of more than 20 hospitals visited by the AP in Congo, only one did not detain patients.

"What's striking about this issue is that the more we look for this, the more we find it," said Dr. Ashish Jha, director of the Harvard Global Health Institute. "It's probably hundreds of thousands, if not millions of people, that this affects worldwide."

During several August visits to Kenyatta National Hospital - a major medical institution designated a Center of Excellence by the U.S. Centers for Disease Control and Prevention - the AP witnessed armed guards in military fatigues standing watch over patients. Detainees slept on bedsheets on the floor in cordoned-off rooms. Guards prevented one worried father from seeing his detained toddler.

Kenya's ministry of health and Kenyatta canceled several scheduled interviews with the AP and declined to respond to repeated requests for comment.

Health experts decry hospital imprisonment as a human rights violation. Yet the United Nations, U.S. and international health agencies, donors and charities have all remained silent while pumping billions of dollars into these countries to support their splintered health systems or to fight outbreaks of diseases including AIDS and malaria.

"People know patients are being held prisoner, but they probably think they have bigger battles in public health to fight, so they just have to let this go," said Sophie Harman, a global health expert at Queen Mary University of London.

Detained patient Robert Wanyonyi lies on a bed in the Kenyatta National Hospital in Nairobi, Kenya on Aug. 11, 2018. He is trapped in his fourth-floor bed, unable to go to India, where he believes doctors might help him. AP

"We can't just let people leave if they don't pay"

Hospitals often acknowledge detaining patients isn't profitable, but many say it can sometimes result in a partial payment and serves as a deterrent.

Festus Njuguna, an oncologist at the Moi Teaching and Referral Hospital in Eldoret, about 300 kilometres northwest of Nairobi, said the institution regularly detains children with cancer who have finished their treatment, but whose parents cannot pay.

"It's not a very good feeling for the doctors and nurses who have treated these patients, to see them kept like this," Njuguna said.

Still, many officials openly defend the practice.

"We can't just let people leave if they don't pay," said Leedy Nyembo-Mugalu, administrator of Congo's Katuba Reference Hospital. He said holding patients wasn't an issue of human rights, but simply a way to conduct business: "No one ever comes back to pay their bill a month or two later."

Global health agencies and companies that operate where patients are held hostage often have very little to say about it.

The CDC provides about $1.5 million every year to Kenyatta National Hospital and Pumwani Maternity Hospital, helping to cover treatment costs for patients with HIV and tuberculosis, among other programs. The CDC declined to comment on whether it was aware that patients were regularly detained at the two hospitals or if it condones the practice.

No guidance against hospital imprisonment

Dr. Agnes Soucat of the World Health Organization said it does not support patient detentions, but has been unable to document where it happens. And while WHO has issued hundreds of health recommendations on issues from AIDS to Zika virus, the agency has never published any guidance advising countries not to imprison people in their hospitals.

Many Kenyan human rights advocates lament that hospitals continue to hold patients despite what was seen as a landmark judgment in 2015.

Back then, the High Court ruled that the detention of two women at Pumwani who couldn't pay their delivery fees - Maimuna Omuya and Margaret Oliele - was "cruel, inhuman and degrading." Omuya and her newborn were held for almost a month next to a flooded toilet while Oliele was handcuffed to her bed after trying to escape.

Maimuna Awuor Omuya stands outside her home in Nairobi, Kenya on Aug. 9, 2018. In September 2010, unable to pay her bill at Pumwani Maternity Hospital after the delivery of her sixth child, Omuya and her baby were imprisoned along with more than 60 other women in a damp ward. AP

Earlier this month, the High Court ruled again that imprisoning patients "is not one of the acceptable avenues (for hospitals) to recover debt."

Omuya said she is still psychologically scarred by her detention at Pumwani, especially after another recent run-in with a Nairobi hospital.

Several months ago, her youngest brother was treated for a suspected poisoning. When Omuya and her family were unable to pay the bill, the situation took a familiar but unwelcome turn: he was imprisoned. Her brother was only freed after his doctor intervened.

"Detentions still go on because there are no rights here," Omuya said. "What I suffered, I want no one else to suffer."

AP EDITOR'S NOTE: First in a two-part series on hospitals that detain patients if they cannot pay their bills.