The bile duct descends posterior to the superior part of the duodenum and lies in a groove on the posterior surface of the head of the pancreas. On the left side of the descending part of the duodenum, the bile duct comes into contact with the main pancreatic duct. These ducts run obliquely through the wall of this part of the duodenum, where they unite, forming a dilation, the hepatopancreatic ampulla. The distal end of the ampulla opens into the duodenum through the major duodenal papilla. The circular muscle around the distal end of the bile duct is thickened to form the sphincter of the bile duct (Latin ductus choledochus). When this sphincter contracts, bile cannot enter the ampulla and the duodenum; hence, bile backs up and passes along the cystic duct to the gallbladder for concentration and storage.