Background: Bevacizumab has been suggested to have similar effectiveness to ranibizumab for treatment of neovascular age-related macular degeneration. The Inhibition of VEGF in Age-related choroidal Neovascularisation (IVAN) trial was designed to compare these drugs and different regimens. Here, we report the findings at the prespecified 2-year timepoint. Methods: In a multicentre, 2×2 factorial, non-inferiority randomised trial, we enrolled adults aged at least 50 years with active, previously untreated neovascular age-related macular degeneration and a best corrected distance visual acuity (BCVA) of at least 25 letters from 23 hospitals in the UK. Participants were randomly assigned (1:1:1:1) to intravitreal injections of ranibizumab (0·5 mg) or bevacizumab (1·25 mg) in continuous (every month) or discontinuous (as needed) regimens, with monthly review. Study participants and clinical assessors were masked to drug allocation. Allocation to continuous or discontinuous treatment was masked up to 3 months, at which point investigators and participants were unmasked. The primary outcome was BCVA at 2 years, with a prespecified non-inferiority limit of 3·5 letters. The primary safety outcome was arterial thrombotic event or hospital admission for heart failure. Analyses were by modified intention to treat. This trial is registered, number ISRCTN92166560. Findings: Between March 27, 2008, and Oct 15, 2010, 628 patients underwent randomisation. 18 were withdrawn; 610 received study drugs (314 ranibizumab; 296 bevacizumab) and were included in analyses. 525 participants reached the visit at 2 years: 134 ranibizumab in continuous regimen, 137 ranibizumab in discontinuous regimen, 127 bevacizumab in continuous regimen, and 127 bevacizumab in discontinuous regimen. For BCVA, bevacizumab was neither non-inferior nor inferior to ranibizumab (mean difference -1·37 letters, 95% CI -3·75 to 1·01; p=0·26). Discontinuous treatment was neither non-inferior nor inferior to continuous treatment (-1·63 letters, -4·01 to 0·75; p=0·18). Frequency of arterial thrombotic events or hospital admission for heart failure did not differ between groups given ranibizumab (20 [6%] of 314 participants) and bevacizumab (12 [4%] of 296; odds ratio [OR] 1·69, 95% CI 0·80-3·57; p=0·16), or those given continuous (12 [4%] of 308) and discontinuous treatment (20 [7%] of 302; 0·56, 0·27-1·19; p=0·13). Mortality was lower with continuous than discontinuous treatment (OR 0·47, 95% CI 0·22-1·03; p=0·05), but did not differ by drug group (0·96, 0·46-2·02; p=0·91). Interpretation: Ranibizumab and bevacizumab have similar efficacy. Reduction in the frequency of retreatment resulted in a small loss of efficacy irrespective of drug. Safety was worse when treatment was administered discontinuously. These findings highlight that the choice of anti-VEGF treatment strategy is less straightforward than previously thought.