Many people don’t learn they have HIV until they develop an opportunistic infection (OI)—an illness, such as a fungal or bacterial infection, that strikes immune systems damaged by the virus. Doctors often wait to start people on HIV meds until they’ve finished treating the OI, hoping to minimize side effects and other problems.

But a recent Stanford University study suggests that waiting might not be the best strategy. In the randomized, 282-person study, people who started HIV meds at the same time as OI treatment showed a benefit. Over 48 weeks, there were 34 new AIDS diagnoses or deaths among people who deferred HIV treatment until after their OI therapy ended, compared with 20 among those who began HIV meds immediately. The immediate starters also saw faster gains in CD4 counts. And some good news for everyone: About half of each group achieved undetectable viral loads.