Endoscopic retrograde cholangiopancreatography (ERCP) is a diagnostic and therapeutic procedure used to examine and treat conditions of the bile ducts, pancreatic duct, and gallbladder. It combines endoscopy and fluoroscopy to allow direct visualization and intervention, such as stone removal or stent placement, in these ductal systems.