Anal cancer is an increasing issue in HIV-positive men who have sex with men (MSM). Screening for its precursor, anal intraepithelial neoplasia (AIN), is subject of discussion. Current treatment options are suboptimum and have not been compared in a prospective trial. We compared efficacy and side-effects of imiquimod, topical fluorouracil, and electrocautery for the treatment of AIN. In this open-label randomised trial, we included HIV-positive MSM older than 18 years visiting the HIV outpatient clinic of the Academic Medical Center, Amsterdam, Netherlands. Patients with histologically confirmed AIN were randomly assigned to receive either 16 weeks of imiquimod (three times a week), 16 weeks of topical fluorouracil (twice a week), or monthly electrocautery for 4 months. Randomisation was done with random block sizes of three and six, stratified for AIN grade (AIN grades 1, 2, or 3) and AIN location (peri-anal or intra-anal). Participants were assessed by high-resolution anoscopy 4 weeks after treatment. Responding patients returned for follow-up 24 weeks, 48 weeks, and 72 weeks after treatment. The primary endpoint was histological resolution of AIN measured 4 weeks after treatment and AIN recurrence at week 24, week 48, and week 72 after treatment. The primary analysis was done in a modified intention-to-treat population, including all patients who had received their assigned treatment at least once. The trial is registered at the Netherlands Trial Register, number NTR1236. Between Aug 12, 2008, and Dec 1, 2010, we screened 388 HIV-positive MSM for AIN by high resolution anoscopy. Of the 246 (63%) patients who had AIN, 156 (63%) were randomly assigned to either receive imiquimod (54 patients), topical fluorouracil (48 patients), or electrocautery (46 patients) following withdrawing of consent by eight patients. Modified intention-to-treat analysis showed a complete response in 13 (24%, 95% CI 15-37) patients in the imiquimod group, eight (17%, 8-30) of patients in the fluorouracil group, and 18 (39%, 26-54) of patients in the electrocautery group (p=0·027). At week 24, 11 (22%) of 50 responders had recurrence; at week 48, 22 (46%) of 48 had recurred; and at week 72, 30 (67%) of 45 had recurred. Recurrence was observed at 72 weeks in 10 (71%) of 14 patients treated with imiquimod, seven (58%) of 12 patients treated with fluorouracil, and 13 (68%) of 19 patients treated with electrocautery. Grade 3-4 side-effects were noted in 23 (43%) of 53 patients in the imiquimod group, 13 (27%) of 48 patients in the fluorouracil group, and eight (18%) patients in the electrocautery group (p=0·019). The most common side-effects were pain, bleeding, and itching. Seven serious adverse events occurred, all not related to the study. Electrocautery is better than imiquimod and fluorouracil in the treatment of AIN, but recurrence rates are substantial. Anna Maurits de Cock foundation provided funding for the video colposcope.