Anastomotic leakage is a severe postoperative complication in colorectal surgery and compromised bowel perfusion is considered a major contributing factor. Conventional methods to assess bowel perfusion have a low predictive value for anastomotic leakage. We therefore aimed to evaluate the efficacy of real-time assessment with near-infrared (NIR) fluorescence imaging with indocyanine green (ICG) in the prevention of anastomotic leakage. This multicentre, randomised, controlled, phase 3 trial was done in eight hospitals in the Netherlands. We included adults (aged >18 years) who were scheduled for laparoscopic or robotic colorectal surgery (with planned primary anastomosis) for benign and malignant diseases. Preoperatively, patients were randomly assigned (1:1) to fluorescence-guided bowel anastomosis (FGBA) or conventional bowel anastomosis (CBA) by variable block randomisation (block sizes 4, 6, and 8) and stratified by site. The operating surgeon and investigators analysing the data were not masked to group assignment. Patients were unmasked after the surgical procedure or after study end. In the FGBA group, surgeons marked anastomosis levels per conventional perfusion assessment and then administered 5 mg of ICG by 2 mL intravenous bolus. They assessed bowel perfusion using NIR fluorescence imaging and adjusted (or kept) transection lines accordingly. Only conventional methods for bowel perfusion assessment were used in the CBA group. The primary outcome was the difference in the rate of clinically relevant anastomotic leakage (ie, requiring active therapeutic intervention but manageable without reoperation [grade B] or requiring reoperation [grade C], per the International Study Group of Rectal Cancer) between the FGBA group and the CBA group within 90 days post-surgery. The primary outcome and safety were assessed in the intention-to-treat population. This study was registered with ToetsingOnline.nl (NL7502) and ClinicalTrials.gov (NCT04712032) and is complete. Between July 2, 2020, and Feb 21, 2023, 982 patients were enrolled, of whom 490 were assigned to FGBA and 492 were assigned to CBA. After excluding 51 patients, the intention-to-treat population comprised 931 (463 assigned FGBA and 468 assigned CBA). Patients had a median age of 68·0 years (IQR 59·0-75·0) and 485 (52%) were male and 446 (48%) were female. Ethnicity data were not available. The overall 90-day rate of clinically relevant anastomotic leakage was not significantly different between the FGBA group (32 [7%] of 463 patients) and the CBA group (42 [9%] of 468 patients; relative risk 0·77 [95% CI 0·50-1·20]; p=0·24). No adverse events related to ICG use were observed. 313 serious adverse events in 229 (25%) patients were at 90-day follow-up (159 serious adverse events in 113 [24%] patients in the FGBA group and 154 serious adverse events in 116 [25%] patients in the CBA group). 18 (2%) people died by 90 days (ten in the FGBA group and eight in the CBA group). ICG NIR fluorescence imaging did not reduce 90-day anastomotic leakage rates in this trial across all types of colorectal surgeries. Further research should be done in subgroups, such as rectosigmoid resections, for which evidence suggests ICG NIR might be beneficial. Olympus Medical, Diagnostic Green, and Intuitive Foundation.