ERCP, short for endoscopic retrograde cholangiopancreatography, is a procedure that combines a flexible camera tube (endoscope) with real-time X-ray imaging to find and treat problems in the bile and pancreatic ducts. These are the small tubes that carry digestive fluids from your liver, gallbladder, and pancreas into your small intestine. Unlike a standard imaging scan, ERCP can both diagnose a problem and fix it in the same session, which is why it remains one of the most important tools in gastroenterology despite being more invasive than alternatives.
Why Doctors Order an ERCP
ERCP is almost exclusively used today as a therapeutic procedure, meaning it’s ordered when your doctor already suspects a specific problem and wants to treat it during the same session. The most common reason is a gallstone that has slipped out of the gallbladder and become stuck in the bile duct (a condition called choledocholithiasis). A trapped stone can block bile flow, causing intense pain, jaundice, or a dangerous infection of the bile duct called cholangitis.
Other reasons include narrowing (strictures) of the bile or pancreatic ducts, bile leaks after surgery, and evaluation of tumors or other growths affecting the ducts. If your doctor only needs a picture of the ducts without treatment, they’ll typically order an MRCP instead, which is a non-invasive MRI scan. MRCP has become accurate enough to replace ERCP for purely diagnostic purposes in many situations, sparing patients the risks of an invasive procedure. ERCP is reserved for cases where intervention is likely needed.
How the Procedure Works
You’ll be sedated for the procedure, typically with medication delivered through an IV that puts you into a deep, comfortable drowsiness. The doctor then guides a specialized endoscope called a duodenoscope down your throat, through your stomach, and into the first part of your small intestine (the duodenum). This scope is different from the one used in a standard upper endoscopy: it has a side-viewing camera and a small elevator mechanism at its tip that allows the doctor to precisely aim instruments toward the opening where your bile and pancreatic ducts empty into the intestine.
Once in position, the doctor threads a thin catheter through the scope and into the duct opening. A contrast dye is injected through the catheter, which makes the normally invisible ducts light up on a live X-ray screen (fluoroscopy). This gives the doctor a detailed map of the duct system, revealing stones, blockages, or narrowed areas in real time.
From there, treatment happens through the same scope. If a stone is found, the doctor may make a small cut in the muscular valve at the duct opening (called a sphincterotomy) to widen it, then pull the stone out using a tiny inflatable balloon or wire basket. If a duct is narrowed by scar tissue or a tumor, the doctor can place a stent, a small plastic or metal tube that holds the duct open and restores drainage. The entire procedure typically takes 30 minutes to an hour, though complex cases can take longer.
Success and Complication Rates
ERCP is a technically demanding procedure. For patients who have never had the duct opening accessed before (called a “virgin papilla”), the success rate for getting into the bile duct is around 80%, based on audit data from endoscopy certification benchmarks. When the duct is successfully accessed, the intended treatment, whether stone removal or stent placement, is completed in most cases.
The overall short-term complication rate is around 10%. The most well-known risk is post-ERCP pancreatitis, an inflammation of the pancreas triggered by the procedure. This occurs in roughly 2% to 16% of patients in most studies, though rates can climb higher in certain populations. It typically causes abdominal pain and nausea in the days after the procedure, and most cases are mild and resolve on their own, though severe cases may require hospitalization.
Perforation, where the scope or instruments create a small tear in the intestinal wall, is rare, occurring in less than 1% of procedures. Bleeding from a sphincterotomy site can also occur. These serious complications are uncommon but are part of the reason ERCP is reserved for situations where treatment is genuinely needed rather than used as a screening tool.
Preparing for an ERCP
You’ll need to stop eating at least 6 hours before the procedure so your stomach and small intestine are empty, giving the doctor a clear view. You can usually have small sips of water up to 2 hours beforehand, but nothing after that. If you take blood thinners like warfarin, aspirin, or clopidogrel, your doctor will likely ask you to pause them for a few days before the procedure to reduce bleeding risk. Diabetes medications and sedatives may also need dose adjustments, so make sure your care team knows about everything you take.
Because you’ll be sedated, you won’t be able to drive yourself home. Plan for someone to pick you up and stay with you for the rest of the day.
What Recovery Looks Like
After the procedure, you’ll stay in the endoscopy recovery area for 4 to 6 hours while the medical team monitors you for early signs of complications like pancreatitis or bleeding. Your throat may feel sore from the scope, and you might feel bloated from the air pumped into your digestive tract during the procedure. Both of these pass quickly.
In most cases, you can eat normally once you’re fully awake. However, depending on what was done during the ERCP, your team may ask you to wait 12 hours or longer before eating, or to start with soft foods. You’ll get specific instructions before you leave. Most people feel back to normal within a day or two, though mild soreness or bloating can linger slightly longer. If you develop significant abdominal pain, fever, or vomiting in the days following the procedure, those are signs that need prompt medical attention, as they can indicate pancreatitis or infection.

