Objective: To evaluate the effect of timing of surgery on the long-term clinical outcome of surgery in chronic pancreatitis (CP). Design: Cohort study with long-term follow-up. Setting: Five specialized academic centers. Patients: Patients with CP treated surgically for pain. Interventions: Pancreatic resection and drainage procedures for pain relief. Main Outcome Measures: Pain relief (pain visual analogue score <= 4), pancreatic function, and quality of life. Results: We included 266 patients with median follow-up of 62 months (interquartile range, 31-112). Results were presented as odds ratios (ORs) with 95% confidence intervals after correction for bias using bootstrap-corrected analysis. Pain relief was achieved in 149 patients (58%). Surgery within 3 years of symptoms was independently associated with more pain relief (OR, 1.8; 95% CI, 1.0-3.4; P=.03) and less endocrine pancreatic insufficiency (OR, 0.57; 95% CI, 0.33-0.96; P=.04). More pain reli Conclusions: The timing of surgery is an important risk factor for clinical outcome in CP. Surgery may need to be considered at an earlier phase than it is now, preferably within 3 years of symptomatic CP. Likelihood of postoperative pain relief can be calculated on an individual basis using the presented nomogram.