Background Multistage, stepwise HIV testing and treatment procedures can result in lost opportunities to provide timely antiretroviral therapy (ART). Incomplete engagement of patients along the care cascade translates into high preventable mortality. We aimed to identify whether a structural intervention to streamline testing and linkage to HIV health care would improve testing completeness, ART initiation, and viral suppression and reduce mortality. Methods We did a cluster-randomised, controlled trial in 12 hospitals in Guangxi, China.