More than 10,000 lives a year could be saved with a simple change to HIV medication, doctors say.
HIV is often diagnosed late, when it has already ravaged the immune system, leaving people vulnerable.
To counter this, researchers tried prescribing a cocktail of drugs at the start of HIV therapy to treat "opportunistic" infections.
The results, published in the New England Journal of Medicine, showed deaths fell by 27%.
HIV itself does not kill. Instead, it leaves the body exposed to dangerous bacterial infections such as tuberculosis or pneumonia as well as fungi that can cause cryptococcal meningitis.
But starting antiretroviral therapy poses risks too. The drugs restore the immune system, but if it suddenly realises there is an infection, then it can launch such a strong attack – in the brain, for example – that this can occasionally be deadly too.
So, the trial gave patients with a CD count – used to measure the health of the immune system – below 100 a mix of drugs, including antibiotics, alongside standard antiretroviral medication for HIV.
Patients with a CD count below 50 are six times more likely to die within 24 weeks than those with a count above 100.