Kenya: The Kenyatta National Hospital is east Africa's biggest medical institution. The hospital's website proudly proclaims its motto - "We Listen ... We Care" - along with photos of smiling doctors, a vaccination campaign and staffers holding aloft a gold trophy at an awards ceremony.

But there are no pictures of Robert Wanyonyi, shot and paralyzed in a robbery more than a year ago. Kenyatta will not allow him to leave the hospital because he cannot pay his bill of nearly 4 million Kenyan shillings ($39,570). He is trapped in his fourth-floor bed, unable to go to India, where he believes doctors might help him.

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

Even death does not guarantee release

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. Mothers and babies are sometimes separated. 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.

Dozens of doctors, nurses, health experts, patients and administrators told The Associated Press of imprisonments in hospitals in at least 30 other countries, including Nigeria and Congo, China and Thailand, Lithuania and Bulgaria, and others in Latin America and the Middle East.

Similar cases of patient detention in Asia and sub-Saharan Africa: 

•    In the Philippines, Annalyn Manalo was held at Mount Carmel Diocesan General Hospital in Lucena City for 1½ months starting last December following treatment for heart problems. Administrators refused initially to allow her family to pay in installments - and the cost of each extra day in detention was added to the bill.

•    In Congo's second city of Lubumbashi, the AP visited more than 20 hospitals and clinics and found that all but one routinely detained patients who failed to pay, even though the practice is illegal there.

•    In Bangalore, India, Emmanuel Malagi was detained in a private hospital for three months after he was treated for a spinal tumor, according to his brother, Christanand. Prevented from seeing him, his family scrambled unsuccessfully to pay his nearly Rs 1.4 million - and when he died, the hospital demanded another Rs 10 lakh to release the body.

•    In Malaysia, a medical student from the Netherlands on a diving trip got the bends. He couldn't afford his decompression treatment; the hospital locked him in a room for four days, with no food or drink, until he was able to get the money, according to Saskia Mostert, a Dutch academic who has researched hospital detentions.

•    In Bolivia, a government ombudsman reported that 49 patients were detained in hospitals or clinics in the last two years because they couldn't pay, despite a law that prohibits the practice.

Expert opinion

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

In many countries when patients cannot afford to pay for health care, they are usually either sent to a public hospital where treatment is covered by the state or refused help altogether. In some hospitals in Cameroon and elsewhere, for example, the problem of patient imprisonment was solved by some institutions by simply demanding payment upfront.

Where patients are imprisoned, hospitals acknowledge it is not necessarily profitable. But many say it often leads at least to partial payment and serves as a deterrent.

A fight for human rights

Foreign agencies and companies that operate where patients are held hostage typically have very little to say about it. Some experts said the international health community's failure to address the issue has undermined its own goals.

One international organisation did fight publicly for detained patients.

Researchers for the Center for Reproductive Rights, which acts to support women's health around the world, were conducting a study of maternal health care in Kenya in early 2012 when they learned of the cases of Maimuna Awuor Omuya and Margaret Oliele.

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, in September 2010. She often slept on the wet ground next to a flooded toilet. Mother and child were released after nearly a month, but only when one of Omuya's friends appealed to the mayor to intervene.

Two months later, Oliele arrived at Pumwani. During a botched cesarean section, doctors left a pair of surgical scissors inside Oliele's stomach; a second surgery was needed to remove the scissors and she later suffered a ruptured bladder and a blood infection. When she couldn't pay her hospital fees, Oliele was taken to a detention ward. She was held for six days.

Center for Reproductive Rights lawyers resolved to take up the cause of detained patients, bringing suit on behalf of Omuya and Oliele.

"These were two very appalling cases and their treatment was very degrading," said Evelyne Opondo, a senior regional director at the center who oversaw the case.

They won. In September 2015, Kenya's High Court ruled the women's detention violated numerous human rights enshrined in the constitution and was therefore illegal. The High Court described the women's detention as "cruel, inhuman and degrading." The court further ordered the Kenyan government to "take the necessary steps to protect all patients from arbitrary detention in health care facilities."

But three years later, it appears little has changed.