Authorities increased security Friday at a tuberculosis hospital where patients with drug-resistant forms of the disease went on a rampage to protest prison-like conditions.

Twenty-two patients were arrested Wednesday, accused of public violence and assault after they pelted staff with stones and vandalized equipment. But the local police station and prison refused to admit them because of fears of the highly infectious disease. Instead, they were returned to the hospital.

"When the patients were arrested, they threatened staff members, saying that they would retaliate when they returned to the hospital," local health authority spokesman Sizwe Kupelo said. "This will not be tolerated."

The Jose Pearson hospital, near the coastal city of Port Elizabeth, treats about 300 patients. Many have multidrug-resistant TB and the even more dangerous extensively drug-resistant TB, which is very difficult and expensive to treat. Those with drug-resistant strains are supposed to stay in the hospital for six months to two years, living in isolated wards surrounded by barbed wire and security guards.

South African authorities have reluctantly resorted to enforced confinement of patients with drug-resistant TB because of fears that it might otherwise spread through the community. TB is an airborne bacteria and can be spread easily through coughing or sneezing.

The country is gripped by a tuberculosis crisis, which is feeding off the AIDS epidemic and striking the weakened immune system of victims. Nearly 60 percent of South African TB patients have AIDS. The emergence of drug-resistant TB strains — often the result of not sticking to the standard six-month course of treatment — has worsened patients' chances of survival.

There were 2,901 cases of multidrug-resistant TB in South Africa last year, and 561 cases of extensively drug-resistant TB. But the reported figures are believed to be only an indication of the real situation, because many patients die before they can be diagnosed.

This year, the government is spending an additional $50 million on beds for people with drug-resistant TB. But anger, frustration and depression are high at hospitals like Jose Pearson, and there are constant staff shortages because nurses are afraid of contracting the disease.

Twenty-two patients cut through the hospital's wire fencing and escaped just before Christmas to spend time with their families. Most eventually returned after authorities searched house to house, but the same pattern was repeated at Easter.

The Eastern Cape provincial health department equipped the hospital with new televisions, DVDs and games to try to relieve the boredom.

The local Herald newspaper said tension at the hospital exploded Wednesday after patients refused to let a nurse give them their daily injection. A local government official arrived to try to defuse the row and when security guards opened a gate to allow the nurse to leave, patients stormed them.

The guards, armed with pepper spray and batons, formed a human chain behind the car and blocked the patients who wielded iron rods and golf clubs. Some patients hurled rocks and a large concrete brick through the window of the security booth and smashed video monitors. A large contingent of police arrived, donned protective masks and latex gloves, and arrested the patients, the newspaper reported.