Forty-seven patients thought to have dysfunction of the sphincter of Oddi were randomly assigned to undergo endoscopic sphincterotomy or sham sphincterotomy in a prospective double-blind study. All the patients had pain resembling biliary pain, had previously undergone a cholecystectomy, and had clinical characteristics suggesting biliary obstruction. The patients were randomly assigned to the treatment (n = 23) or nontreatment (n = 24) group before manometric examination of the sphincter of Oddi was performed. Sphincterotomy resulted in improvement in pain scores at one-year follow-up in 10 of 11 patients with elevated sphincter pressure. In contrast, there was improvement in only 3 of 12 patients with elevated basal sphincter pressures who underwent the sham procedure. In patients with normal sphincter pressure, pain scores were similar regardless of treatment. After one year, sphincterotomy was performed in 12 symptomatic patients who had undergone the sham procedure--7 with elevated sphincter pressures and 5 with normal sphincter pressures. Forty patients were followed for four years. Of the 23 patients with increased sphincter pressure, 10 of the original 11 who underwent sphincterotomy remained virtually free of pain; 7 others who subsequently underwent sphincterotomy also benefited from it. Thus, 17 of 18 patients with sphincter-of-Oddi dysfunction verified by manometry benefited from sphincterotomy. In patients with normal sphincter pressure, sphincterotomy was no more beneficial than sham therapy. Our observations suggest that endoscopic sphincterotomy offers long-term relief of pain in a group of patients with verified sphincter-of-Oddi dysfunction.