From time to time, small gallstones pass into the bile duct and are trapped in the region of the sphincter of the ampulla, which obstructs the flow of bile into the duodenum. This, in turn, produces jaundice.