Hydatid disease constitutes a serious public health problem throughout the world, especially in endemic areas, despite the use of various kinds of preventive measures. Currently, there are three treatment options for hepatic hydatid disease including surgery, PAIR (puncture, aspiration, injection, and re-aspiration), and chemotherapy with benzimidazole compounds. Each of these therapeutic modalities has limitations depending on the individual case. The authors review the use of diagnostic and therapeutic endoscopic retrograde cholangiopancreatography (ERCP) in the management of hepatobiliary hydatid disease (HHD) to clarify its place in the treatment algorithm among surgical, medical, and percutaneous measures. ERCP in the preoperative period: (1) defines the cystobiliary relationship to help in surgery planning, (2) permits evaluation for acute conditions like cholangitis and obstruction so that subsequent surgery can be performed on an elective basis, (3) may give permanent cure specifically in cases of frank intrabiliary rupture if evacuation of biliary tract and cystic cavity is manageable, and (4) when combined with preoperative endoscopic sphincterotomy may decrease the incidence of the development of postoperative external fistula. ERCP in the postoperative period: (I) can help to clarify the causes of ongoing or recurrent symptoms or laboratory abnormalities, (2) may help to resolve the obstruction or cholangitis due to residual material in biliary ducts, (3) may provide the chance to manage postoperative external biliary fistulae, and (4) may be a realistic solution for secondary biliary strictures. Considering the current literature and adding this experience, the authors propose a new treatment algorithm in HHD including medical, surgical, PAIR, and ER,CP-related therapies. To illustrate the algorithm, a case is presented of a patient who had a persistent external biliary fistula in the postoperative period and was managed successfully by endoscopic approach.