HIV incidence is the best measure of treatment-programme effectiveness, but its measurement is difficult and expensive. The concept of community viral load as a modifiable driver of new HIV infections has attracted substantial attention. We set out to compare several measures of community viral load and antiretroviral therapy (ART) coverage as correlates of HIV incidence in high-risk populations. We analysed data from a sample of people who inject drugs and men who have sex with men, who were participants of the baseline assessment of a cluster-randomised trial in progress across 22 cities in India (ClinicalTrials.gov number NCT01686750). We recruited the study population by use of respondent-driven sampling and did the baseline assessment at 27 community-based sites (12 for men who have sex with men and 15 for people who inject drugs). We estimated HIV incidence with a multiassay algorithm and calculated five community-based measures of HIV control: mean log10 HIV RNA in participants with HIV in a community either engaged in care (in-care viral load), aware of their status but not necessarily in care (aware viral load), or all HIV-positive individuals whether they were aware, in care, or not (population viral load); participants with HIV in a community with HIV RNA more than 150 copies per mL (prevalence of viraemia); and the proportion of participants with HIV who self-reported ART use in the previous 30 days (population ART coverage). All participants were tested for HIV, with additional testing in HIV-positive individuals. We assessed correlations between the measures and HIV incidence with Spearman correlation coefficients and linear regression analysis. Between Oct 1, 2012, and Dec 19, 2013, we recruited 26,503 participants, 12,022 men who have sex with men and 14,481 people who inject drugs. Median incidence of HIV was 0·87% (IQR 0·40-1·17) in men who have sex with men and 1·43% (0·60-4·00) in people who inject drugs. Prevalence of viraemia was more strongly correlated with HIV incidence (correlation 0·81, 95% CI 0·62-0·91; p<0·0001) than all other measures, although correlation was significant with aware viral load (0·59, 0·27-0·79; p=0·001), population viral load (0·51, 0·16-0·74; p=0·007), and population ART coverage (-0·54, -0·76 to -0·20; p=0·004). In-care viral load was not correlated with HIV incidence (0·29, -0·10 to 0·60; p=0·14). With regression analysis, we estimated that to reduce HIV incidence by 1 percentage point in a community, prevalence of viraemia would need to be reduced by 4·34%, and ART use in HIV-positive individuals would need to increase by 19·5%. Prevalence of viraemia had the strongest correlation with HIV incidence in this sample and might be a useful measure of the effectiveness of a treatment programme. US National Institutes of Health, Elton John AIDS Foundation.