['Urinary dysfunction (UD) is common after rectal cancer treatment, but the contribution of each treatment component (surgery and radiotherapy) to its development remains unclear. This study aimed to evaluate UD during 5 years after total mesorectal excision (TME) and to investigate the influence of preoperative radiotherapy (PRT) and surgical factors.', 'Patients with operable rectal cancer were randomized to TME with or without PRT. Questionnaires concerning UD were completed by 785 patients before and at several time points after surgery. Possible risk factors, including PRT, demographics, tumour location, and type and extent of resection, were investigated by multivariable regression analysis.', 'Long-term incontinence was reported by 38.1 per cent of patients, of whom 72.0 per cent had normal preoperative function. Preoperative incontinence (relative risk (RR) 2.75, P = 0.001) and female sex (RR 2.77, P < 0.001) were independent risk factors. Long-term difficulty in bladder emptying was reported by 30.6 per cent of patients, of whom 65.0 per cent had normal preoperative function. Preoperative difficulty in bladder emptying (RR 2.94, P < 0.001), peroperative blood loss (RR 1.73, P = 0.028) and autonomic nerve damage (RR 2.82, P = 0.024) were independent risk factors. PRT was not associated with UD.'] Is urinary dysfunction after rectal cancer treatment mainly caused by surgery?