BACKGROUND Identification of new ways to increase access to antiretroviral therapy in Africa is an urgent priority. We assessed whether home-based HIV care was as effective as was facility-based care. METHODS We undertook a cluster-randomised equivalence trial in Jinja, Uganda. 44 geographical areas in nine strata, defined according to ratio of urban and rural participants and distance from the clinic, were randomised to home-based or facility-based care by drawing sealed cards from a box. The trial was integrated into normal service delivery. All patients with WHO stage IV or late stage III disease or CD4-cell counts fewer than 200 cells per microL who started antiretroviral therapy between Feb 15, 2005, and Dec 19, 2006, were eligible, apart from those living on islands. Follow-up continued until Jan 31, 2009. The primary endpoint was virological failure, defined as RNA more than 500 copies per mL after 6 months of treatment. The margin of equivalence was 9% (equivalence limits 0.69-1.45). Analyses were by intention to treat and adjusted for baseline CD4-cell count and study stratum. This trial is registered at http://isrctn.org, number ISRCTN 17184129. FINDINGS 859 patients (22 clusters) were randomly assigned to home and 594 (22 clusters) to facility care. During the first year, 93 (11%) receiving home care and 66 (11%) receiving facility care died, 29 (3%) receiving home and 36 (6%) receiving facility care withdrew, and 8 (1%) receiving home and 9 (2%) receiving facility care were lost to follow-up. 117 of 729 (16%) in home care had virological failure versus 80 of 483 (17%) in facility care: rates per 100 person-years were 8.19 (95% CI 6.84-9.82) for home and 8.67 (6.96-10.79) for facility care (rate ratio [RR] 1.04, 0.78-1.40; equivalence shown). Two patients from each group were immediately lost to follow-up. Mortality rates were similar between groups (0.95 [0.71-1.28]). 97 of 857 (11%) patients in home and 75 of 592 (13%) in facility care were admitted at least once (0.91, 0.64-1.28). INTERPRETATION This home-based HIV-care strategy is as effective as is a clinic-based strategy, and therefore could enable improved and equitable access to HIV treatment, especially in areas with poor infrastructure and access to clinic care.