General information only. It does not replace advice from a health professional. Do not change or stop your medicines without advice. For vomiting blood, black stools, severe abdominal pain or jaundice with fever, call emergency services.

What ERCP is
Endoscopic retrograde cholangiopancreatography (ERCP) combines endoscopy and radiology. Bile made by the liver flows down the common bile duct, and pancreatic juice from the pancreas down the pancreatic duct (duct of Wirsung); both open together into the duodenum through a small opening, the ampulla (papilla) of Vater, surrounded by the sphincter of Oddi. In ERCP an endoscope reaches the papilla, a thin catheter is passed "upstream" (hence retrograde) and contrast is injected so the ducts can be seen on X-ray.
It was first performed in the late 1960s and for decades was the main test for imaging the bile duct. Today, with MRCP and endoscopic ultrasound, which diagnose as well or better without its risks, ERCP is almost always therapeutic: it is performed when it is already known, or highly likely, that something needs to be done.
The instrument is a duodenoscope, a side-viewing endoscope (the camera looks sideways rather than forwards) with an elevator that steers instruments towards the papilla. Catheters, guidewires, sphincterotomes (fine electrosurgical knives), balloons, baskets, stents and cholangioscopes pass through its channel.
What it is used for: indications
| Situation | What is done at ERCP | Reference guideline |
|---|---|---|
| Confirmed or highly likely bile duct stones | Sphincterotomy and extraction with balloon or basket | ESGE 2019, ASGE 2019 |
| Acute cholangitis (fever, jaundice and pain from infected obstruction) | Urgent or early biliary drainage depending on severity | Tokyo Guidelines 2018 |
| Gallstone pancreatitis with cholangitis | ERCP within 24 hours | ACG 2024, IAP/APA 2013 |
| Malignant biliary obstruction (pancreas, bile duct, lymph nodes) | Sampling and stenting (plastic or metal) | ESGE 2018 biliary stenting |
| Bile leak after gallbladder surgery | Sphincterotomy or stent so bile drains into the duodenum | ESGE |
| Benign strictures (after surgery, transplant, chronic pancreatitis) | Dilatation and multiple plastic or covered metal stents | ESGE |
| Primary sclerosing cholangitis with a dominant stricture | Balloon dilatation, brushing and biopsy | EASL 2022 |
| Chronic pancreatitis with pancreatic duct stones or stricture | Extraction, lithotripsy, pancreatic stent | ESGE 2018 |
When it is not needed
- Gallstone pancreatitis without cholangitis or persistent obstruction: urgent ERCP does not improve outcomes, even in predicted severe pancreatitis (APEC trial, Lancet 2020). The 2024 ACG guideline reserves it for cholangitis or ongoing biliary obstruction. See the acute pancreatitis guide.
- Intermediate probability of stones: EUS or MRCP first.
- Biliary drainage before surgery for a tumour: ESGE does not recommend it routinely; it is reserved for cholangitis, very severe itching or jaundice, when surgery will be delayed or when chemotherapy will be given before surgery.
- Pain after gallbladder removal with no objective evidence of obstruction (formerly "type III sphincter of Oddi dysfunction"): the EPISOD trial (JAMA, 2014) showed sphincterotomy was no better than a sham procedure.
How is the need for ERCP for stones decided?
The American Society for Gastrointestinal Endoscopy (ASGE, 2019) guideline classifies people with symptomatic gallstones by the probability of also having bile duct stones:
| Probability | Criteria | Recommended approach |
|---|---|---|
| High | Stone seen in the bile duct on ultrasound or CT; or cholangitis; or total bilirubin above 4 mg/dL with a dilated bile duct | ERCP directly (or duct exploration at surgery) |
| Intermediate | Abnormal liver tests; or age over 55; or dilated bile duct on ultrasound | EUS or MRCP first, or intraoperative cholangiography |
| Low | None of the above | Cholecystectomy without further tests |
The European ESGE guideline (2019) recommends removing bile duct stones whenever they are found, even if asymptomatic, and removing the gallbladder afterwards in most cases to prevent further episodes.
How to prepare
- Fasting for 6 hours for solids (clear fluids until 2 hours before, depending on the centre).
- Blood tests: recent full blood count, clotting, liver and kidney function.
- Antiplatelets and anticoagulants: sphincterotomy is a high bleeding-risk procedure. According to the 2021 BSG/ESGE guideline, aspirin is generally continued; clopidogrel, prasugrel or ticagrelor are stopped a few days before if thrombotic risk is low (with a recent coronary stent, cardiology is consulted); direct oral anticoagulants are usually stopped about 2–3 days before depending on kidney function, and warfarin about 5 days before, sometimes with heparin bridging. If only a stent is placed without cutting, the risk is lower. Always follow your team's written instructions and do not stop anything on your own.
- Allergy to iodinated contrast: tell the team. Contrast is injected inside the ducts and little reaches the blood, so reactions are rare.
- Pregnancy: always mention it. If essential (for example, cholangitis), ERCP can be done with shielding and minimal radiation, ideally in the second trimester.
- Antibiotics: ESGE (2020) does not recommend them routinely; they are given when incomplete drainage is anticipated (hilar strictures, primary sclerosing cholangitis), in liver transplant recipients and in some cholangioscopy procedures.
- Previous surgery: a gastric bypass or other Roux-en-Y reconstruction prevents the duodenoscope from reaching the papilla; alternatives exist (laparoscopy-assisted ERCP, EUS-guided access through the excluded stomach, or enteroscopy).
What happens, step by step
- Deep sedation or general anaesthesia with controlled sedation, usually propofol, in a room with X-ray equipment.
- Position: prone or on your side, with a mouthguard.
- Preventing pancreatitis: unless contraindicated, a 100 mg diclofenac or indomethacin suppository is given just before or after the procedure (ESGE 2020 and ASGE 2023 recommendation).
- Cannulation: the scope reaches the second part of the duodenum; a catheter and guidewire enter the bile duct. This is the key step: in expert hands it succeeds in more than 90–95% of cases.
- Cholangiography: contrast is injected and the ducts are seen on X-ray.
- Treatment: depending on the findings, sphincterotomy (a cut of a few millimetres in the sphincter with electric current), stone extraction with a balloon or (Dormia) basket, balloon dilatation, biliary or pancreatic stents, or sampling (brushing, biopsy).
- Recovery: a few hours of observation. Many planned ERCPs allow you to go home the same day; others need an overnight stay or are done in people already in hospital.
Difficult stones
Large (over 1.5 cm), multiple or impacted stones may need large-balloon papillary dilatation, mechanical lithotripsy (crushing them with a reinforced basket) or cholangioscopy (a thin camera inside the bile duct) with laser or electrohydraulic lithotripsy. If not all can be removed, a plastic stent is left to secure drainage and ERCP is repeated weeks later.
Biliary stents
- Plastic: inexpensive, block in about 3 months; useful temporarily.
- Self-expanding metal: last longer; the choice for palliating malignant obstruction when surgery is not possible. Covered ones are also used in some benign strictures and later removed.
See stents, dilatation and POEM.
Risks and complications
ERCP is the digestive endoscopy with the highest risk, which is why it is only performed when the expected benefit is clear.
| Complication | Approximate frequency | Comment |
|---|---|---|
| Post-ERCP pancreatitis | 3–10% (more in high-risk people) | Mostly mild; severe in under 1% overall |
| Bleeding after sphincterotomy | Around 1–2% | Usually controlled endoscopically; may be delayed by up to 2 weeks |
| Cholangitis | About 1% | More if drainage is incomplete |
| Perforation | Under 1% | Many are managed without surgery |
| Cardiorespiratory (sedation) | Uncommon | More in older or frail people |
| Mortality | In the order of 0.1–0.4% | Depends mainly on the underlying disease |
Post-ERCP pancreatitis and how it is prevented
By consensus criteria it is new or worsening abdominal pain with lipase or amylase more than three times the upper limit of normal within 24 hours, requiring admission or a longer stay. Risk factors: female sex, younger age, previous pancreatitis or post-ERCP pancreatitis, suspected sphincter dysfunction, a non-dilated bile duct with normal bilirubin, difficult cannulation (many attempts or over 5–10 minutes), contrast injection or guidewire passage into the pancreatic duct, and balloon dilatation of the papilla without sphincterotomy.
Evidence-based prevention (ESGE 2020, ASGE 2023):
- Rectal NSAID (100 mg diclofenac or indomethacin) for everyone without a contraindication.
- Aggressive hydration with Hartmann's (lactated Ringer's) solution during and after the procedure, especially if NSAIDs cannot be used and there is no risk of fluid overload (heart or kidney failure).
- Prophylactic pancreatic stent in high-risk people or after difficult cannulation. In the SVI trial (Elmunzer and colleagues, The Lancet, 2024), in high-risk patients rectal indomethacin alone was not shown to be non-inferior to indomethacin plus a pancreatic stent, and the combination had less pancreatitis, so the stent remains advisable in this group.
- Technique: guidewire-assisted cannulation, limiting contrast injection into the pancreatic duct and early use of alternative techniques (precut) in expert hands.
Act immediately: go to the emergency department or call 112 (in Europe, or your local emergency number) if after ERCP you have severe abdominal pain that does not settle, fever with shivering, vomiting blood or black stools, chest or neck pain, or dizziness on standing. Bring the procedure report.
How to read the report
An ERCP report usually includes:
- Indication and previous findings (MRCP, EUS).
- Anatomy: whether the papilla is normal, whether there is a duodenal diverticulum next to it (makes the procedure harder), previous surgery.
- Cannulation: whether it was selective for the bile duct or pancreas, whether it was difficult (attempts, time, precut) and whether the pancreatic duct filled with contrast.
- Cholangiography: bile duct diameter (in adults usually up to about 6–7 mm is considered normal, slightly more in older people or after gallbladder removal), filling defects (stones), strictures (site, length, appearance), leaks.
- Therapy: size of sphincterotomy, number and size of stones removed, stent type, diameter and length.
- Result: "duct clear" on the final occlusion cholangiogram, or partial drainage.
- Prophylaxis given and immediate complications.
- Plan: stent removal or exchange (date), gallbladder surgery, pathology results.
Example report (teaching example, invented data)
Woman aged 58 with biliary colic, jaundice and bilirubin 5.2 mg/dL. Ultrasound: gallstones and 10 mm common bile duct with a distal stone. Prophylaxis: rectal diclofenac 100 mg. Normal papilla. Selective biliary cannulation with guidewire at the second attempt, no pancreatic duct entry. Cholangiogram: 11 mm common bile duct with two filling defects of 8 and 10 mm. Medium-sized biliary sphincterotomy. Two stones extracted with a balloon. Final occlusion cholangiogram: duct clear. No immediate complications. Recommendations: observation, diet in 4–6 hours if pain-free, blood tests the next day. Refer to surgery for cholecystectomy, ideally during the same admission or in the following weeks.
Limitations
- Failed cannulation in 5–10% of cases outside referral centres: it is repeated, another technique is used, or drainage is achieved by EUS or percutaneously (interventional radiology).
- Sampling biliary strictures: brushing has low sensitivity (often under 50%) for cancer; cholangioscopy with targeted biopsy and molecular techniques improve it.
- Radiation: a moderate dose, generally without consequences, but important in pregnancy and repeated procedures.
- Experience: ESGE recommends that ERCP be done by endoscopists and centres with sufficient volume who monitor their quality indicators.
After ERCP
- Diet: fluids, then a light diet if pain-free.
- Restarting anticoagulants or antiplatelets: as the endoscopist advises (often the next day or a few days later if a sphincterotomy was done).
- Plastic stents: cannot be left indefinitely; they must be exchanged or removed as planned (usually within weeks or a few months). Ask for the date and write it down.
- Cholecystectomy: if there were gallbladder stones, removal is recommended to prevent recurrence, unless surgical risk is very high. See the gallstone guide.
Frequently asked questions
Why not just an MRCP? If the bile duct only needs to be seen, that is the right choice. ERCP is chosen when something needs to be done: removing the stone or placing a stent.
Does cutting the sphincter have consequences? Long term, sphincterotomy is well tolerated. It may allow gut bacteria to reach the bile duct, but in practice few people have problems.
When will I be back to normal? Without complications, in a day or two. Do not drive on the day of the procedure.
Questions to ask
- What is the ERCP expected to do: remove stones, place a stent or take samples?
- Is there a risk-free test that could answer the question first?
- Do I have risk factors for pancreatitis? Which preventive measures will be used?
- What should I do with my anticoagulants or antiplatelets?
- If a stent is left, when does it need changing or removing?
- Will I need my gallbladder removed afterwards?
Sources
- Elmunzer BJ, Foster LD, Serrano J, et al. Indomethacin with or without prophylactic pancreatic stent placement to prevent pancreatitis after ERCP: a randomised non-inferiority trial. Lancet. 2024;403(10425):450-458. doi:10.1016/S0140-6736(23)02356-5
- Tenner S, Vege SS, Sheth SG, et al. American College of Gastroenterology Guidelines: Management of Acute Pancreatitis. Am J Gastroenterol. 2024;119(3):419-437. doi:10.14309/ajg.0000000000002645
- Buxbaum JL, Freeman M, Amateau SK, et al. American Society for Gastrointestinal Endoscopy guideline on post-ERCP pancreatitis prevention strategies: summary and recommendations. Gastrointest Endosc. 2023;97(2):153-162. doi:10.1016/j.gie.2022.10.005
- Dumonceau JM, Kapral C, Aabakken L, et al. ERCP-related adverse events: European Society of Gastrointestinal Endoscopy (ESGE) Guideline. Endoscopy. 2020;52(2):127-149. doi:10.1055/a-1075-4080
- Manes G, Paspatis G, Aabakken L, et al. Endoscopic management of common bile duct stones: European Society of Gastrointestinal Endoscopy (ESGE) guideline. Endoscopy. 2019;51(5):472-491. doi:10.1055/a-0862-0346
- Buxbaum JL, Abbas Fehmi SM, Sultan S, et al. ASGE guideline on the role of endoscopy in the evaluation and management of choledocholithiasis. Gastrointest Endosc. 2019;89(6):1075-1105. doi:10.1016/j.gie.2018.10.001
- Dumonceau JM, Tringali A, Papanikolaou IS, et al. Endoscopic biliary stenting: indications, choice of stents, and results: European Society of Gastrointestinal Endoscopy (ESGE) Clinical Guideline – Updated October 2017. Endoscopy. 2018;50(9):910-930. doi:10.1055/a-0659-9864
- Kiriyama S, Kozaka K, Takada T, et al. Tokyo Guidelines 2018: diagnostic criteria and severity grading of acute cholangitis. J Hepatobiliary Pancreat Sci. 2018;25(1):17-30. doi:10.1002/jhbp.512
- Schepers NJ, Hallensleben NDL, Besselink MG, et al. Urgent endoscopic retrograde cholangiopancreatography with sphincterotomy versus conservative treatment in predicted severe acute gallstone pancreatitis (APEC): a multicentre randomised controlled trial. Lancet. 2020;396(10245):167-176. doi:10.1016/s0140-6736(20)30539-0
- Cotton PB, Durkalski V, Romagnuolo J, et al. Effect of endoscopic sphincterotomy for suspected sphincter of Oddi dysfunction on pain-related disability following cholecystectomy: the EPISOD randomized clinical trial. JAMA. 2014;311(20):2101-2109. doi:10.1001/jama.2014.5220
- Veitch AM, Radaelli F, Alikhan R, et al. Endoscopy in patients on antiplatelet or anticoagulant therapy: BSG and ESGE guideline update. Gut. 2021;70(9):1611-1628.
Sources reviewed in November 2026.