Endoscopic retrograde cholangiopancreatography (ERCP) is a diagnostic and therapeutic procedure used to evaluate and treat conditions of the bile ducts, pancreas, and gallbladder. During an ERCP, a flexible endoscope is inserted through the mouth, down the esophagus, and into the stomach and duodenum. The endoscope is then passed through the opening of the bile ducts and pancreatic ducts, and a contrast dye is injected into these ducts. This allows the doctor to visualize the internal structures and take X-rays to diagnose conditions such as gallstones, tumors, and blockages. ERCP can also be used to remove gallstones or other obstructions, take tissue samples for biopsy, or treat pancreatic or bile duct disorders by placing stents or balloons to open blocked ducts. ERCP is a minimally invasive procedure, but it does carry some risks, including pancreatitis, bleeding, and infection. Patients will typically be instructed to fast for several hours before the procedure and will receive sedation to help them relax. Following the procedure, patients will be monitored for complications and may experience mild discomfort or bloating. ERCP is a valuable tool for diagnosing and treating a range of digestive disorders, and your doctor will work with you to determine if it is the best option for your individual needs.