In addition to demonstrated public health benefits on reducing transmission, it remains unclear how early antiretroviral therapy (ART) must be started after acquisition of human immunodeficiency virus (HIV) to maximize individual benefits. We conducted an open-label randomized clinical study in Lima, Peru among adult men who have sex with men and transgender women with acute (HIV-antibody negative/HIV-1 RNA positive) or recent (confirmed negative HIV-antibody or RNA test within 3 months) HIV infection, who were randomized to start ART immediately versus defer by 24 weeks. We evaluated outcomes by treatment arm and immunologic markers by days since estimated date of detectible infection (EDDI). Of 216 participants, 105 were assigned to immediate arm and 111 to deferred arm (median age 26.8 years, 37% with acute HIV). The incidence of non-ART-related adverse events was lower in immediate versus deferred arm (83 vs 123/100 person-years, IRR 0.67 (95% confidence interval [CI] .47, .95; P = .02), the difference dominated by fewer infections in those treated immediately. After 24 weeks of ART, between-group differences in CD4/CD8 cell ratio lessened (P = .09 overall), but differences between those initiating ART ≤ 30 days from EDDI (median 1.03, interquartile range [IQR] 0.84, 1.37), and those initiating > 90 days (0.88, IQR 0.61, 1.11) remained, P = .02. Principal components analysis of 20 immune biomarkers demonstrated distinct patterns between those starting ART > 90 days from EDDI versus those starting within 30 or 90 days (both P < .001). To our knowledge, this is the only evaluation of randomized ART initiation during primary HIV and provides evidence to explicitly consider acute HIV in World Health Organization recommendations for universal ART. NCT01815580.