Nevirapine is commonly used to treat HIV in poorer countries
Patients being treated for tuberculosis (TB) may not get the full benefits from HIV therapy, researchers say.
Nevirapine - a cheap antiretroviral drug used to treat HIV in developing countries - did not work as well in patients also on TB treatment.
But another more expensive drug - efavirenz - did not seem to be affected by the TB treatment, the Journal of the American Medical Association reported.
Around 40% of HIV patients in the South African study were also treated for TB.
In poorer countries, antiretroviral therapy is often initiated in TB clinics, because TB is an infection common in HIV patients.
Nevirapine is a common choice because of its cost and can be used in women of child-bearing age.
There is concern that giving HIV drugs alongside a TB treatment known as rifampicin may cause toxic effects or reduce the effectiveness of the drugs.
Researchers looked at almost 4,000 patients who started antiretroviral therapy between 2001 and 2006.
The researchers found that patients with tuberculosis who were also treated with nevirapine were about twice as likely to have a high viral load - that is high levels of HIV in their system - as those without tuberculosis.
And patients being treated with nevirapine with TB therapy were more than twice as likely to develop speedy virological failure - where the drugs are not working.
But there were no differences between patients starting efavirenz with and without tuberculosis treatment.
The nevirapine treatment was also effective if it was started first, before the TB treatment.
It is thought the TB drugs speed up the breakdown of nevirapine in the body.
Study leader Dr Andrew Boulle of the University of Cape Town said that, given the continued reliance on nevirapine-based regimens in Africa and the importance of TB services in initiating people on HIV therapy, further research was warranted.
"One of the most striking aspects of our study was the demonstration that 40% of patients starting antiretroviral therapy in recent years have concurrent tuberculosis, underscoring the public health importance of improving affordable treatment options for patients infected with HIV and tuberculosis."
John Howson, associate director of the International HIV/Aids Alliance, said the study raised an interesting point but it was too soon to make recommendations about treatment.
"The study suggests that TB treatment may compromise the effectiveness of some antiretroviral therapies. This information may influence the treatment of people living with HIV who are co-infected with TB."
He added that nevirapine had revolutionised HIV treatment because it could be given during pregnancy.