Summary Background Local recurrence rates in operable rectal cancer are improved by radiotherapy (with or without chemotherapy) and surgical techniques such as total mesorectal excision. However, the contributions of surgery and radiotherapy to outcomes are unclear. We assessed the effect of the involvement of the circumferential resection margin and the plane of surgery achieved. Methods In this prospective study, the plane of surgery achieved and the involvement of the circumferential resection margin were assessed by local pathologists, using a standard pathological protocol in 1156 patients with operable rectal cancer from the CR07 and NCIC-CTG CO16 trial, which compared short-course (5 days) preoperative radiotherapy and selective postoperative chemoradiotherapy, between March, 1998, and August, 2005. All analyses were by intention to treat. This trial is registered, number ISRCTN 28785842. Findings 128 patients (11%) had involvement of the circumferential resection margin, and the plane of surgery achieved was classified as good (mesorectal) in 604 (52%), intermediate (intramesorectal) in 398 (34%), and poor (muscularis propria plane) in 154 (13%). We found that both a negative circumferential resection margin and a superior plane of surgery achieved were associated with low local recurrence rates. Hazard ratio (HR) was 0·32 (95% CI 0·16–0·63, p=0·0011) with 3-year local recurrence rates of 6% (5–8%) and 17% (10–26%) for patients who were negative and positive for circumferential resection margin, respectively. For plane of surgery achieved, HRs for mesorectal and intramesorectal groups compared with the muscularis propria group were 0·32 (0·16–0·64) and 0·48 (0·25–0·93), respectively. At 3 years, the estimated local recurrence rates were 4% (3–6%) for mesorectal, 7% (5–11%) for intramesorectal, and 13% (8–21%) for muscularis propria groups. The benefit of short-course preoperative radiotherapy did not differ in the three plane of surgery groups (p=0·30 for trend). Patients in the short-course preoperative radiotherapy group who had a resection in the mesorectal plane had a 3-year local recurrence rate of only 1%. Interpretation In rectal cancer, the plane of surgery achieved is an important prognostic factor for local recurrence. Short-course preoperative radiotherapy reduced the rate of local recurrence for all three plane of surgery groups, almost abolishing local recurrence in short-course preoperative radiotherapy patients who had a resection in the mesorectal plane. The plane of surgery achieved should therefore be assessed and reported routinely. Funding Medical Research Council (UK) and the National Cancer Institute of Canada.