top of page
Rinnit logo – modern health products and health news

ERCP (Endoscopic Retrograde Cholangiopancreatography): Why It's Done, What Happens and Risks

Nov 6
7 min read

Written and medically reviewed by Dr. Baraa Alnahhal, MD · Last reviewed: November 2026 · How we review

Quick Answer: What is an ERCP?

ERCP (endoscopic retrograde cholangiopancreatography) is a procedure that looks inside your bile ducts and pancreatic duct. A gastroenterologist passes an endoscope through your mouth to the small intestine, injects contrast dye into the ducts and takes live X-rays to find blockages such as gallstones, narrowing or tumors, and can often treat them during the same procedure. [1]

What the research says

Key takeaways

  • ERCP combines endoscopy with fluoroscopy, a moving X-ray, to view the bile and pancreatic ducts. [1]

  • It can diagnose and treat problems such as gallstones, strictures, leaks and tumors in one session. [1]

  • It is outpatient, takes one to two hours and is done under sedation. [1]

  • Complications occur in about 5% to 10% of procedures. [1]

  • You need someone to drive you home. [1]

What is an ERCP?

If your provider suspects a problem in your biliary system, they may order an ERCP. The long name describes the technology: [1]

  • Endoscopic: a tiny camera on a tube passes down your throat into the small intestine while you are sedated.

  • Retrograde: contrast dye is injected backward into the bile and pancreatic ducts through a smaller tube.

  • Cholangiopancreatography: X-ray pictures of the bile ducts (cholangio) and pancreas (pancreato).

The dye makes the tiny ducts show up on X-ray, so blockages such as gallstones, tumors or scar tissue become visible, and the endoscope lets the doctor treat them on the spot. [1]

Why would you need an ERCP?

Your provider may suggest an ERCP if you have unexplained upper belly pain or biliary colic, or signs of stalled bile flow or bile leakage, such as jaundice. ERCP can help diagnose and treat: [1]

  • Inflammation and possible infection of the bile ducts (cholangitis)

  • Narrowing from scar tissue (biliary stricture)

  • Gallstones in the common bile duct

  • Gallstone pancreatitis

  • Tumors or cancer in the bile ducts

  • Bile duct leaks or other injuries

How do you prepare for an ERCP?

Your provider gives you personal instructions. In general, they ask you to: [1]

  • Not smoke, eat, chew gum or drink anything except water for eight hours before.

  • Review your conditions and medicines; you may need to stop some, such as blood thinners.

  • Mention any past reactions or allergies to contrast dye or anesthesia.

  • Arrange a ride home, because anesthesia takes 24 hours to wear off.

What happens during an ERCP?

ERCP is an outpatient procedure that takes one to two hours. You receive anesthesia through an IV, and you probably won't remember the procedure. A gastroenterologist usually performs it. [1]

Five steps of an ERCP: sedation, endoscope to the duodenum, finding the duct opening, injecting contrast dye, then X-ray imaging and treatment

ERCP combines endoscopy with live X-ray imaging.

  1. Your throat may be numbed with a liquid anesthetic.

  2. The endoscope passes through your mouth, esophagus and stomach to the top of the small intestine (duodenum).

  3. Using the video, the doctor finds the opening of the bile and pancreatic ducts.

  4. A smaller tube slides through the endoscope into that opening, and contrast dye is injected.

  5. Fluoroscopy takes real-time X-ray video as the dye moves through the ducts, using brief pulses of a safe radiation dose.

  6. The images are checked for blockages, swelling or leaks.

Sources: [1]

What can be treated during ERCP?

If the doctor finds a problem, they can often fix it with tiny tools passed through the endoscope. [1]

Six treatments possible during ERCP: gallstone removal, biopsy, dilating narrowed ducts, stent placement, leak repair and sphincterotomy

Many problems can be treated in the same session.

Treatment

What it does

Stone removal

Breaks up and removes gallstones

Biopsy

Removes tumors or tissue samples

Dilation

Stretches narrowed ducts

Stent

Keeps a duct propped open

Leak repair

Repairs a leak or injury in the ducts

Sphincterotomy

A small cut in the muscle around the duct opening to widen it

Sources: [1]

What is recovery like after an ERCP?

You stay at the medical center for an hour or two while the anesthesia wears off, then your driver takes you home. You may feel groggy for the rest of the day. Mild discomfort for a day or two can include: [1]

  • Sore throat and trouble swallowing: soft foods or liquids can help until it settles.

  • Bloating or gas pain: from air used to inflate the GI tract for better viewing.

  • Nausea: a side effect of anesthesia that wears off within a day.

What are the risks of ERCP?

Complications occur in about 5% to 10% of ERCP procedures. Risk depends partly on your existing conditions and on the type of treatment done during the procedure. [1]

Possible ERCP complications next to warning signs that need a call to your provider

Know the warning signs before you go home.

  • Reaction to the sedative: can affect the heart and lungs in people with lung or heart disease.

  • Allergic reaction to contrast dye: treated quickly with medicine.

  • Injury to the GI tract: internal bleeding or, in severe cases, a hole.

  • Bile duct injury: can cause a bile leak.

  • Infection: antibiotics may be given beforehand to prevent it.

  • Pancreatitis: irritation and inflammation of the pancreas.

Sources: [1]

If you are pregnant, there is a low risk to the fetus from the X-rays. Your doctor will ask beforehand and may reschedule or limit radiation exposure. [1]

When will you get ERCP results?

Your endoscopist can usually explain what they found and what they fixed right after the procedure, unless you are still groggy. Biopsy results may take a few weeks. If nothing was found, or the issue was not fully fixed, you may need another test or procedure. [1]

When should you call your doctor?

Contact your provider for severe or unusual symptoms after ERCP, such as: [1]

  • Severe belly pain or swelling

  • Chest pain or trouble breathing

  • Fever, vomiting or other signs of infection

  • Rectal bleeding or black, tarry stools

How is ERCP different from other tests?

A standard upper endoscopy only reaches the upper GI tract. ERCP adds a second catheter that slides inside the endoscope to reach the bile and pancreatic ducts, and it is the only endoscopic procedure that lets the doctor operate directly on them. MRCP and endoscopic ultrasound can show the ducts but cannot treat them. [1]

ERCP is not surgery in the traditional sense, because it enters through the mouth rather than an incision. Work done through the endoscope may involve cutting or stitching, but these are generally minor procedures with fewer risks and a shorter recovery than classic surgery. [1]

Would I have an ERCP for pancreatitis?

Possibly. Gallstones stuck in the ducts are among the most common causes of acute pancreatitis, and ERCP can remove the blockage. In chronic pancreatitis, scarring can narrow the pancreatic ducts, and ERCP can stretch them or place a stent so pancreatic juices keep flowing. [1]

Conclusion

ERCP is both a test and a treatment: in one outpatient session, it can show what is blocking your bile or pancreatic ducts and often clear it. It is more invasive than a scan but much less invasive than surgery.

Prepare by fasting, reviewing your medicines and arranging a ride home, and know the warning signs that need a call after the procedure.

Keep learning: Read our guide to bile duct gallstones (choledocholithiasis) or our cholangitis guide. For more background, see the NIDDK page on ERCP.

FAQ

What is an ERCP?

It is a procedure that combines an endoscope and moving X-rays to examine, and often treat, the bile and pancreatic ducts.

Why would I need an ERCP?

For unexplained upper belly pain or signs of blocked bile flow such as jaundice, often caused by gallstones, strictures or tumors.

How long does an ERCP take?

Usually one to two hours, and you go home the same day.

Will I be asleep during an ERCP?

You receive sedation through an IV; you may or may not be awake, but you probably won't remember it.

How do I prepare for an ERCP?

Do not eat, smoke, chew gum or drink anything but water for eight hours, review your medicines and arrange a ride home.

What can be treated during an ERCP?

Gallstones, narrowed ducts, leaks and blockages; the doctor can also take biopsies and place stents.

What are the risks of an ERCP?

Complications occur in about 5% to 10% of procedures, including pancreatitis, infection, bleeding and, rarely, perforation.

Is ERCP major surgery?

No. It is an endoscopic procedure through the mouth, with fewer risks and a shorter recovery than traditional surgery.

What is recovery like after an ERCP?

You stay an hour or two, feel groggy for the day and may have a sore throat, bloating or nausea for a day or two.

When should I call a doctor after an ERCP?

Call for severe belly pain or swelling, chest pain, trouble breathing, fever, vomiting, rectal bleeding or black stools.

Related Reading

Gallstone Pancreatitis: Causes, Symptoms, and Treatment covers when ERCP is used to clear a blocked duct.

Cholangitis: What It Is, Why It Happens, and When It's an Emergency describes the bile duct infection ERCP can help drain.

References

  1. Cleveland Clinic. ERCP: What It Is, Why It's Done, Procedure & Complications. Cleveland Clinic. Last updated November 1, 2023. https://my.clevelandclinic.org/health/diagnostics/4951-ercp-endoscopic-retrograde-cholangiopancreatography

  2. Andriulli A, Loperfido S, Napolitano G, et al. Incidence rates of post-ERCP complications: a systematic survey of prospective studies. Am J Gastroenterol. 2007;102(8):1781-1788. PMID 17509029. https://doi.org/10.1111/j.1572-0241.2007.01279.x

  3. Freeman ML, Nelson DB, Sherman S, et al. Complications of endoscopic biliary sphincterotomy. N Engl J Med. 1996;335(13):909-918. PMID 8782497. https://doi.org/10.1056/NEJM199609263351301

Medical disclaimer

This article is for general education only and does not replace advice from a qualified healthcare professional. Talk to your doctor about your own diagnosis and treatment, and seek emergency care right away for severe or sudden symptoms.

Comments


bottom of page