Invasive treatment for abdominal pain due to chronic pancreatitis may be either surgical or endoscopic, particularly in cases of ductal obstruction. To date, the data published on the effectiveness of these two forms of therapy have been mostly retrospective, and there have been no randomized studies. A prospective, randomized study comparing surgery with endoscopy in patients with painful obstructive chronic pancreatitis was therefore conducted. Consecutive patients with pancreatic duct obstruction and pain were invited to participate in a randomized trial comparing endotherapy and surgery, the latter consisting of resection and drainage procedures, depending on the patient's individual situation. Patients who did not agree to participation and randomization were also further assessed using the same follow-up protocol. Of 140 eligible patients, only 72 agreed to be randomized. Surgery consisted of resection (80 %) and drainage (20 %) procedures, while endotherapy included sphincterotomy and stenting (52 %) and/or stone removal (23 %). In the entire group, the initial success rates were similar for both groups, but at the 5-year follow-up, complete absence of pain was more frequent after surgery (37 % vs. 14 %), with the rate of partial relief being similar (49 % vs. 51 %). In the randomized subgroup, results were similar (pain absence 34 % after surgery vs. 15 % after endotherapy, relief 52 % after surgery vs. 46 % after endotherapy). The increase in body weight was also greater by 20 - 25 % in the surgical group, while new-onset diabetes developed with similar frequency in both groups (34 - 43 %), again with no differences between the results for the whole group and the randomized subgroup. Surgery is superior to endotherapy for long-term pain reduction in patients with painful obstructive chronic pancreatitis. Better selection of patients for endotherapy may be helpful in order to maximize results. Due to its low degree of invasiveness, however, endotherapy can be offered as a first-line treatment, with surgery being performed in case of failure and/or recurrence.