
Endoscopic retrograde cholangiopancreatography, commonly known as ERCP, is a specialized medical procedure that combines upper gastrointestinal endoscopy with X-ray imaging to diagnose and treat problems of the bile ducts and pancreatic duct. It is used when doctors suspect or confirm obstruction, stones, narrowing, leakage, infection, or another duct problem that may need direct treatment.
Unlike a standard upper endoscopy, which examines the esophagus, stomach, and duodenum, ERCP allows the doctor to reach the opening of the bile and pancreatic ducts in the duodenum. A special dye is injected into the ducts and X-ray images are taken. If a problem is found, treatment can often be performed during the same session, such as removing a bile duct stone, widening a stricture, taking a sample, or placing a stent to drain bile.
Although ERCP is very useful, it is not performed for every patient with abdominal pain or abnormal liver tests. It is an invasive procedure with possible risks, so doctors choose it when the expected benefit is greater than the risk, especially when a treatable duct problem is likely.
What Is ERCP?
ERCP stands for Endoscopic Retrograde Cholangiopancreatography. It means endoscopic and X-ray examination of the bile ducts and pancreatic duct through a backward approach. A flexible endoscope is passed through the mouth, esophagus, and stomach until it reaches the duodenum, where the bile duct and pancreatic duct open.
After reaching this area, the doctor passes a small tube into the duct opening, injects contrast dye, and takes X-ray images. These images can show obstruction, stones, narrowing, or leakage. If treatment is needed, special instruments can be passed through the endoscope.
Why Is It Called Retrograde?
It is called retrograde because the contrast dye enters the duct from the opening in the duodenum, moving in the opposite direction of normal bile or pancreatic juice flow. Normally, bile flows from the liver and gallbladder toward the intestine. During ERCP, the doctor enters from the intestinal side and looks back into the ducts.
This approach allows access to areas that cannot be seen with regular endoscopy, such as the common bile duct, sometimes ducts inside the liver, and the main pancreatic duct.
How Is ERCP Different From Regular Endoscopy?
Regular upper endoscopy examines the lining of the upper digestive tract. ERCP uses a special endoscope to reach the bile and pancreatic duct opening and combines endoscopy with X-ray imaging and treatment inside the ducts.
Main differences include:
- Regular endoscopy examines digestive tract surfaces.
- ERCP accesses bile or pancreatic ducts.
- ERCP uses contrast dye and X-ray.
- ERCP can remove stones.
- ERCP can place stents.
- ERCP is more invasive than regular endoscopy.
- ERCP requires specialized experience.
- ERCP has specific risks such as pancreatitis.
- Regular endoscopy is often diagnostic.
- ERCP is often therapeutic.
This is why ERCP is performed only when there is a clear reason.
When Does a Patient Need ERCP?
A patient may need ERCP when a suspected or confirmed problem in the bile ducts or pancreatic duct requires direct treatment. Common reasons include a stone in the common bile duct, obstructive jaundice, cholangitis, or a stricture that needs stenting.
Doctors do not rely on symptoms alone. They review blood tests, ultrasound, MRCP, CT scan, or endoscopic ultrasound before deciding.
Bile Duct Stones
One of the most common uses of ERCP is removing stones that pass from the gallbladder into the common bile duct. These stones may cause severe upper abdominal pain, jaundice, abnormal liver enzymes, cholangitis, or biliary pancreatitis.
ERCP may be used for:
- Confirmed common bile duct stone.
- Jaundice with dilated ducts.
- Cholangitis.
- Severe pain with abnormal liver tests.
- Clear bile duct obstruction.
- Pancreatitis with persistent obstruction.
- Stone that does not pass naturally.
- Clearing the duct before gallbladder surgery.
- Pus inside the bile ducts.
- Need for temporary stent placement.
In these cases, the doctor may treat the problem during the procedure rather than only diagnosing it.
Obstruction, Strictures, and Stents
Bile duct obstruction may be caused by benign narrowing, chronic inflammation, stones, external pressure, or tumors of the pancreas or bile duct. When bile cannot flow normally, jaundice, itching, and abnormal liver tests may occur.
ERCP can help with:
- Widening a duct stricture.
- Placing a biliary stent.
- Draining bile.
- Taking samples from a narrowing.
- Treating bile leakage after surgery.
- Evaluating obstruction after gallbladder surgery.
- Relieving obstructive jaundice.
- Treating selected pancreatic duct problems.
- Replacing an old stent.
- Removing a stent when no longer needed.
The type and duration of stent placement depend on the cause of obstruction and the patient’s condition.
How Is ERCP Performed?
ERCP is usually performed in an endoscopy unit or a room equipped for endoscopy and X-ray imaging. The patient must fast before the procedure and receives sedation or anesthesia depending on health condition and center policy. The doctor passes the endoscope through the mouth to the duodenum.
After locating the duct opening, the doctor passes small tools into it, injects dye, and takes X-ray images. If a stone, narrowing, or blockage is found, treatment may be performed during the same session.
Procedure Steps
General steps include:
- Fasting before the procedure.
- Reviewing tests and medications.
- Placing an IV line.
- Giving sedation or anesthesia.
- Passing the endoscope through the mouth.
- Reaching the duodenum.
- Locating the bile and pancreatic duct opening.
- Passing a fine catheter.
- Injecting contrast dye.
- Taking X-ray images.
- Removing stones or placing a stent when needed.
- Monitoring after the procedure.
Procedure time varies depending on difficulty and whether treatment is performed.
Is ERCP Painful?
During the procedure, most patients do not feel significant pain because sedation or anesthesia is used. Afterward, the patient may feel bloating, mild sore throat, gas, or mild abdominal discomfort from the air used during endoscopy.
Severe or persistent pain after ERCP is not normal and should be reported, as it may indicate pancreatitis or another complication.
What Treatments Can Be Done During ERCP?
The main value of ERCP is that it can treat problems, not only show them. For this reason, ERCP is now used mainly as a therapeutic procedure. If the goal is only to image the ducts, MRCP or EUS may be preferred because they are less invasive.
During ERCP, the doctor may use small instruments to remove stones, cut the duct opening, widen strictures, place stents, or take samples.
Stone Removal
If a stone is found inside the bile duct, the doctor may widen the duct opening and remove the stone using a balloon or basket. In some cases, large stones need fragmentation or an additional session.
Stone removal may help:
- Relieve pain.
- Treat jaundice.
- Treat cholangitis.
- Reduce bile obstruction.
- Protect the pancreas from blockage.
- Prepare for gallbladder surgery.
- Prevent recurrent infection.
- Improve liver tests.
- Reduce the need for open surgery.
- Restore bile drainage.
After bile duct stone removal, the patient may still need gallbladder treatment depending on the case.
Stent Placement
A stent is a small tube placed inside the duct to help bile or pancreatic juice drain. Stents may be plastic or metal depending on the cause of blockage and expected duration.
Stents may be used for:
- Bile duct obstruction.
- Benign narrowing.
- Tumor-related narrowing.
- Bile leakage.
- Infection when all stones cannot be removed.
- Temporary drainage before surgery.
- Replacing an old stent.
- Selected pancreatic duct obstruction.
- Relieving jaundice.
- Improving bile flow.
Some stents must be changed or removed at a specific time, so follow-up is very important.

Preparation Before ERCP
Good preparation reduces risks and helps the doctor perform the procedure safely. The doctor must know all medications, especially blood thinners, diabetes medications, heart medications, and any allergies to medicines or contrast dye.
The patient should also tell the doctor about heart, lung, liver, or kidney disease and any previous anesthesia complications.
Fasting and Medications
Patients usually need to fast for several hours before ERCP so the stomach is empty. This reduces the risk of vomiting or aspiration during sedation or anesthesia. The doctor may also adjust some medications before the procedure.
Discuss with the doctor:
- Blood thinners.
- Aspirin or clopidogrel.
- Warfarin or newer anticoagulants.
- Diabetes medications and insulin.
- Blood pressure and heart medications.
- Allergy to antibiotics or contrast dye.
- Pregnancy.
- Kidney disease.
- Liver disease.
- Recent test results.
Do not stop blood thinners or heart medications without medical instructions.
Tests Before the Procedure
The doctor may request tests before ERCP to evaluate obstruction, bleeding risk, and general health. Required tests vary by case.
Tests may include:
- Liver function tests.
- Pancreatic enzymes.
- Complete blood count.
- Coagulation tests.
- Kidney function tests.
- Inflammation markers.
- Abdominal ultrasound.
- MRCP.
- CT scan.
- EUS when needed.
- ECG for selected patients.
- Anesthesia assessment.
These tests help determine whether ERCP is needed and what treatment may be expected.
Risks and Complications of ERCP
ERCP is useful, but it is not risk-free. It is usually chosen only when there is a clear expected benefit. One of the most important complications is pancreatitis after ERCP. Other risks include bleeding, infection, perforation, or anesthesia-related problems.
Most ERCP procedures are completed safely, but patients should understand warning symptoms after discharge.
Post-ERCP Pancreatitis
Post-ERCP pancreatitis is one of the best-known complications. It occurs when the pancreas becomes irritated after the procedure. Symptoms may include severe upper abdominal pain radiating to the back, nausea, vomiting, or elevated pancreatic enzymes.
Possible signs include:
- Severe upper abdominal pain.
- Pain radiating to the back.
- Nausea or vomiting.
- Pain that does not improve.
- Severe bloating.
- Fever in some cases.
- Inability to eat.
- General deterioration.
If these symptoms appear after ERCP, contact the doctor or emergency department immediately.
Bleeding, Perforation, and Infection
Bleeding may occur especially if the duct opening is cut to remove a stone. Rarely, perforation can occur in the bowel or duct. Infection can occur if drainage is not adequate. These complications are uncommon but important.
Urgent warning signs include:
- Severe or increasing pain.
- Fever or chills.
- Persistent vomiting.
- Blood in vomit.
- Black stools.
- Dizziness or fainting.
- Shortness of breath.
- Worsening jaundice.
- Chest pain.
- Severe abdominal distension.
- Clear bleeding.
- General deterioration.
Early medical review is safer than waiting when symptoms are abnormal.
Recovery After ERCP
After ERCP, the patient is monitored until the sedative or anesthesia wears off. Some patients go home the same day, while others need hospital observation, especially if the case is complex, infection is present, or a stent was placed.
Patients should not drive or make important decisions on the same day after sedation. Food, drink, and medication instructions should be followed carefully.
Immediately After the Procedure
After the procedure, the patient is moved to recovery. The medical team monitors blood pressure, pulse, breathing, pain, and alertness. The patient may feel sleepy, bloated, or have a mild sore throat.
After ERCP, patients may experience:
- Sleepiness from sedation.
- Temporary bloating.
- Gas.
- Mild sore throat.
- Mild nausea.
- Mild abdominal discomfort.
- Observation for several hours.
- Waiting for the doctor’s report.
- Food instructions.
- Medication instructions.
- Follow-up appointment.
- Warning signs to watch for.
If a stent was placed, the patient should know when it must be reviewed or replaced.
When Can Eating and Activity Resume?
The doctor decides when eating can resume depending on the case and what was done during ERCP. Some patients start with liquids and light food, while others may need to delay eating if there is pain or concern about complications.
Patients are usually advised to:
- Rest on the same day.
- Avoid driving after sedation.
- Start food according to instructions.
- Drink fluids if allowed.
- Avoid heavy meals at first.
- Monitor pain.
- Take medications as prescribed.
- Do not ignore fever or vomiting.
- Seek emergency care for severe symptoms.
- Attend follow-up visits.
Recovery depends on the reason for ERCP and what treatment was performed.
ERCP vs MRCP vs EUS
Patients may confuse ERCP, MRCP, and EUS. These tests can all evaluate the bile ducts and pancreas, but they are not the same. MRCP is MRI imaging of the ducts without endoscopy. EUS is endoscopic ultrasound. ERCP is an endoscopic therapeutic procedure that can intervene inside the ducts.
The doctor may start with a less invasive test and use ERCP when treatment is needed.
When Is MRCP Suitable?
MRCP is useful when the doctor wants to see the bile and pancreatic ducts without direct treatment. It is non-invasive and does not require instruments inside the ducts, so it can be a good diagnostic option.
MRCP may be requested for:
- Suspected bile duct stone.
- Dilated ducts on ultrasound.
- Abnormal liver tests without clear cause.
- Evaluation of duct narrowing.
- Pancreas assessment.
- Avoiding unnecessary ERCP.
- Planning before treatment.
- Follow-up in selected cases.
- No acute infection needing urgent drainage.
- Need for wider anatomical view.
If MRCP shows a problem that requires treatment, ERCP may follow.
When Is ERCP Better?
ERCP is better when direct treatment is needed, not imaging alone. If a stone needs removal, a blockage needs stenting, or cholangitis needs drainage, ERCP can be very important.
ERCP may be better for:
- Confirmed common bile duct stone.
- Cholangitis.
- Obstructive jaundice needing drainage.
- Stricture needing stent placement.
- Bile leak after surgery.
- Blocked old stent.
- Need for tissue sample from a stricture.
- Pancreatic duct problem needing intervention.
- Failed non-invasive options.
- Urgent therapeutic need.
This is why ERCP is usually a treatment decision, not a routine test.
Who May Not Be Suitable for ERCP?
Some patients need special evaluation before ERCP because of anesthesia, blood thinners, heart or lung disease, or bleeding disorders. This does not always mean ERCP is impossible, but it requires careful preparation and risk-benefit assessment.
The doctor may delay the procedure or adjust the plan if risk is high.
Conditions Requiring Caution
Caution is needed with:
- Bleeding disorders.
- Blood thinner use.
- Severe heart disease.
- Advanced lung disease.
- Allergy to contrast or medications.
- Severe unstable infection.
- Pregnancy.
- Kidney failure.
- Previous surgery changing digestive anatomy.
- Poor general condition.
- Inability to tolerate anesthesia.
- Uncontrolled infection.
These patients may need anesthesia review, medication adjustment, or an alternative approach.
Alternatives When ERCP Is Not Suitable
If ERCP is not suitable or unsuccessful, doctors may use other options depending on the problem. The choice depends on the cause and location of obstruction and team experience.
Possible alternatives include:
- MRCP for diagnosis.
- EUS for diagnosis or guidance.
- Percutaneous biliary drainage.
- Surgery for gallstones or gallbladder disease.
- Stent placement through another route.
- Observation if the condition is mild.
- Antibiotics for infection.
- Supportive care for pancreatitis.
- Interventional radiology procedures.
- Repeat ERCP at a more experienced center.
The decision should be individualized.
Conclusion
ERCP is a specialized procedure that combines endoscopy and X-ray imaging to reach the bile and pancreatic ducts. Its main value is that it can treat important problems such as bile duct stones, obstruction, strictures, leaks, and stent placement.
Despite its benefits, ERCP is not a simple routine test. It carries risks such as pancreatitis, bleeding, infection, or perforation. Therefore, it is chosen when there is a clear therapeutic need after reviewing blood tests, imaging, and the patient’s overall condition.
Frequently Asked Questions: ERCP
Is ERCP a surgery or an endoscopy?
ERCP is an advanced therapeutic endoscopy combined with X-ray imaging. It is not open surgery, but it is more invasive than regular endoscopy.
Can ERCP remove bile duct stones?
Yes. During ERCP, the doctor can remove bile duct stones using special tools such as a balloon or basket.
Is ERCP dangerous?
Most ERCP procedures are safe, but possible risks include pancreatitis, bleeding, infection, and perforation. It is performed when the expected benefit is clear.
Does ERCP require anesthesia?
It is usually performed under sedation or anesthesia depending on the patient’s condition and the center’s protocol.
What is the difference between MRCP and ERCP?
MRCP is MRI imaging of the ducts without treatment. ERCP is an endoscopic procedure that can remove stones, place stents, or treat obstruction.






.png&w=1920&q=70)