ERCP Explained: What to Expect During This Bile Duct Procedure
If your doctor has recommended an ERCP, it is completely understandable to feel nervous about what lies ahead. ERCP stands for Endoscopic Retrograde Cholangiopancreatography, a complex medical term for a specialized procedure used to examine and treat problems in the bile and pancreatic ducts.
Unlike a routine endoscopy or colonoscopy, an ERCP is used for both diagnosis and treatment. It combines a flexible endoscope with real-time X-ray imaging to examine areas that are difficult to reach, including the bile ducts, gallbladder, and pancreatic ducts.
During the procedure, a gastroenterologist guides a thin, flexible endoscope through your mouth, down the esophagus and stomach, and into the duodenum, the first part of the small intestine. From there, tiny instruments can be guided into the bile and pancreatic ducts to identify and treat blockages or other problems.
Depending on what the doctor finds, an ERCP can be used to remove gallstones, open a narrowed duct, or place a small tube called a stent to help restore normal drainage. Sedation or anesthesia is used to keep you comfortable during the procedure.
Understanding what happens before, during, and after an ERCP can make the experience feel much less intimidating. Here is what you should know about preparation, the procedure itself, recovery, possible complications, and follow-up care.
What is Endoscopic Retrograde Cholangiopancreatography (ERCP)?
Endoscopic Retrograde Cholangiopancreatography, commonly called ERCP, is an advanced procedure that combines an upper endoscopy with fluoroscopy, which is a form of real-time X-ray imaging. It is used to diagnose and treat conditions affecting the bile ducts and pancreatic ducts.
The word endoscopic refers to the use of an endoscope, a thin, flexible tube with a camera and light. Retrograde means that contrast dye is injected in the opposite direction of the normal flow of bile and pancreatic fluids. Cholangiopancreatography refers to imaging the bile ducts and pancreatic duct.
In simple terms, ERCP gives doctors access to duct systems that cannot be examined easily from the outside. It allows them to identify problems and, when needed, treat them during the same procedure.
Unlike CT scans and ultrasounds, which provide images from outside the duct system, ERCP allows the doctor to directly access the ducts and perform treatments such as stone removal or stent placement.
Parts of The Digestive Tract An ERCP Examines
An ERCP focuses on the duct systems connected to the liver, gallbladder, and pancreas. These ducts carry bile and digestive enzymes into the duodenum, which is the first section of the small intestine.
The doctor carefully guides the endoscope through the mouth, down the esophagus, through the stomach, and into the duodenum. The main area of interest is a small opening called the major duodenal papilla, also known as the ampulla of Vater.
This opening is where the common bile duct and the main pancreatic duct typically empty their contents into the small intestine.
Specialized catheters can be passed through the endoscope and into this opening, giving the doctor access to the hidden duct system. The bile ducts begin inside the liver and gradually join together into larger ducts. The right and left hepatic ducts come together to form the common hepatic duct.
The cystic duct from the gallbladder then joins this system to form the common bile duct, which eventually drains into the duodenum. The pancreatic duct travels through the pancreas and carries digestive enzymes toward the intestine.
ERCP to Visualize The Fucts
ERCP uses contrast dye and real-time X-ray imaging to make the bile and pancreatic ducts visible. After the endoscope reaches the duodenum, the doctor identifies the ampulla of Vater and guides a very thin catheter through the endoscope and into the appropriate duct.
Contrast material is then slowly injected through the catheter. Because the dye shows up clearly on X-rays, it outlines the duct system and allows the doctor to see its shape and identify abnormalities.
The resulting images are called cholangiograms when they show the bile ducts and pancreatograms when they show the pancreatic duct.
These images can help identify problems such as:
- Gallstones trapped inside the bile duct
- Narrowed areas called strictures
- Leaks caused by surgery or injury
- Tumors or other masses
- Unusual duct anatomy
One of the major advantages of ERCP is that treatment can often begin immediately after a problem is identified. For example, a trapped stone may be removed, or a narrowed duct may be opened with a stent.
When is an ERCP Test Recommended by a Doctor?
Doctors generally recommend ERCP when a problem involving the bile or pancreatic ducts needs more than simple imaging. It may be considered when other tests do not provide enough information or when the suspected condition requires treatment.
Tests such as Magnetic Resonance Cholangiopancreatography (MRCP), endoscopic ultrasound (EUS), and CT scans can provide useful diagnostic information. However, these tests do not usually allow the doctor to treat a blockage at the same time.
ERCP is especially useful when there is a strong concern about a condition that needs prompt treatment. For example, a gallstone blocking the bile duct can cause jaundice or infection called cholangitis. In such cases, removing the obstruction may be necessary.
A doctor may consider ERCP when a person has symptoms such as jaundice, significant upper abdominal pain, unexplained weight loss, or abnormal liver function tests, particularly when earlier imaging suggests a blockage or other duct abnormality.
Because ERCP carries more risks than non-invasive imaging, doctors generally weigh its potential benefits against those risks before recommending it.
Symptoms Leading to a Referral for an ERCP
Symptoms that interfere with the normal flow of bile or pancreatic fluids may lead a doctor to consider an ERCP.
One important warning sign is jaundice, which causes the skin and whites of the eyes to turn yellow. It can occur when bilirubin builds up in the blood because bile cannot drain normally through a blocked duct.
Jaundice may occur along with:
- Dark urine
- Pale or clay-colored stools
- Persistent itching
- Upper abdominal pain
Severe or ongoing pain in the upper abdomen, particularly pain on the right side or pain that travels toward the back, may also suggest a blocked bile duct or pancreatitis caused by duct obstruction.
Blood tests can provide additional clues. Elevated liver enzymes, alkaline phosphatase, or bilirubin may indicate a problem with bile flow.
People who experience repeated episodes of pancreatitis without an obvious explanation may also undergo further evaluation of the pancreatic duct for possible blockages or structural abnormalities.
Conditions An ERCP Diagnoses and Treats
ERCP can be used for a variety of problems involving the bile and pancreatic ducts. Its greatest advantage is that it can often diagnose and treat a problem during the same procedure.
Blockages are among the most common reasons for performing an ERCP.
Gallstones that have moved from the gallbladder into the common bile duct can become trapped and interfere with normal bile drainage. This condition is called choledocholithiasis. During ERCP, the doctor may make a small cut in the sphincter at the duct opening, called a sphincterotomy, to make stone removal easier. A balloon or basket can then be used to remove the stones.
Tumors involving the pancreas, bile duct, or ampulla can also block normal bile flow. Although ERCP does not remove every tumor, it can help relieve the blockage by placing a stent inside the duct. The stent keeps the passage open so bile can drain more normally.
Strictures are narrowed areas of the ducts that can develop because of scar tissue, previous surgery, injury, or long-term inflammation. ERCP may be used to widen these areas and place a stent when necessary.
Bile leaks can also occur after gallbladder surgery, abdominal injury, or liver transplantation. ERCP can help locate the leak and place a temporary stent that redirects bile flow, giving the injured area an opportunity to heal.
If a suspicious narrowing or mass is found, the doctor may also collect tissue or cell samples. Small brushes or forceps can be passed through the endoscope to obtain samples for laboratory testing.
What to Expect Before, During, and After the ERCP Procedure
An ERCP involves several stages, including preparation, the procedure itself, and recovery. Your medical team will provide instructions to help make the process as safe as possible.
Preparation generally begins before the appointment. You may receive instructions about fasting, medications, allergies, and transportation.
On the day of the procedure, nurses and the gastroenterologist will review your medical history and prepare you for sedation. During the ERCP, you will be monitored closely while the doctor examines and treats the ducts.
Afterward, you will spend time in a recovery area while the effects of the sedation wear off. Before leaving, you will receive instructions about eating, activity, medications, and warning signs that require medical attention.
How to prepare for an ERCP Procedure
Proper preparation is important for a safe and successful ERCP. One of the main requirements is fasting before the procedure.
You will usually be told not to eat or drink anything for several hours before the ERCP. This helps keep the stomach and upper digestive tract empty and reduces the risk of stomach contents entering the lungs during sedation.
Medication management is another important part of preparation. Tell your doctor about every medication you take, especially blood thinners and antiplatelet medications.
Medicines such as warfarin, apixaban, rivaroxaban, and clopidogrel may require special instructions before the procedure. Do not stop these medications on your own. Your doctor will tell you whether a medication needs to be paused, adjusted, or continued.
You should also tell the medical team about:
- Medication allergies
- Previous reactions to contrast dye
- Heart conditions
- Lung problems
- Kidney disease
- Other significant medical conditions
Because sedation can temporarily affect your coordination and judgment, you will need someone to drive you home. You should also follow your medical team’s instructions about having someone stay with you afterward.
What Happens During the Actual ERCP Test?
During an ERCP, you are given sedation or anesthesia while the doctor uses an endoscope and X-ray imaging to examine the bile and pancreatic ducts.
Before the procedure begins, you will change into a hospital gown. A nurse will review your medical history and place an IV line in your hand or arm. Monitoring equipment will track your heart rate, blood pressure, breathing, and oxygen level.
A numbing spray may be used in the throat to reduce the gag reflex. The anesthesia team will then administer the appropriate sedation or anesthesia.
Once you are comfortable, the gastroenterologist guides the endoscope through your mouth, down the esophagus and stomach, and into the duodenum.
After locating the ampulla of Vater, the doctor guides a small catheter into the appropriate duct. Contrast dye is injected, and X-ray images are taken to show the duct system.
If a problem is discovered, treatment may be performed during the same session. Depending on the findings, this may include:
- Performing a sphincterotomy
- Removing stones with a balloon or basket
- Widening a narrowed duct
- Placing a stent
- Collecting tissue samples
The procedure may take about 30 minutes or longer depending on what needs to be done and how complex the case is.
Recovery Process After an ERCP
After the ERCP, you will be taken to a recovery area where medical staff monitor you while the sedation wears off.
Feeling sleepy or groggy is common. You may also have a mild sore throat from the endoscope. Bloating and gas can occur because air is introduced into the digestive tract during the procedure.
These symptoms are usually temporary and improve as the effects of the procedure wear off.
Recovery monitoring commonly lasts around one to two hours, although the exact time can vary. Before you leave, your doctor may discuss the initial findings with you and your designated driver.
You will receive instructions for eating and drinking. In some cases, you may begin with clear liquids before gradually returning to your usual diet as tolerated.
For the first day, you should generally rest and avoid driving, operating machinery, or making important decisions while the effects of sedation remain.
Your medical team will also explain which symptoms could indicate a complication. Severe abdominal pain, fever, persistent vomiting, or other concerning symptoms should be reported promptly.
Potential Complications of ERCP
ERCP can be very useful for treating complex problems of the bile and pancreatic ducts, but it is an invasive procedure and carries more risks than routine diagnostic endoscopy.
Complications can result from manipulating the ducts, using specialized instruments, or performing treatments such as a sphincterotomy.
The best-known complication is post-ERCP pancreatitis, which is inflammation of the pancreas following the procedure.
Other possible complications include:
- Infection of the bile ducts, known as cholangitis
- Bleeding
- Perforation or a tear in the digestive tract or duct
- Complications related to sedation or anesthesia
The overall risk varies depending on the person’s health, the condition being treated, the complexity of the ERCP, and the specific treatment performed.
Doctors may take preventive measures to lower the risk of certain complications, particularly pancreatitis.
Common Risks Associated with an ERCP
The main complications associated with ERCP include pancreatitis, bleeding, infection, and perforation. Knowing the warning signs can help patients seek medical care when needed.
Pancreatitis is the most common complication. It occurs when the pancreas becomes inflamed after the procedure. The risk is often around 3% to 5% overall but can be higher in certain patients.
Symptoms can include:
- Severe or persistent abdominal pain
- Pain that spreads toward the back
- Nausea
- Vomiting
Many cases are mild and can be managed with hospital observation, IV fluids, and pain control. More serious cases can require intensive treatment.
Bleeding is more likely when a sphincterotomy has been performed. Minor bleeding may stop without treatment, while significant bleeding may require additional endoscopic treatment or other medical care.
Possible warning signs include vomiting blood or passing black, tar-like stools.
Cholangitis, or infection of the bile ducts, can occur when bile does not drain properly after the procedure. Fever, chills, and abdominal pain can be warning signs. Treatment generally requires prompt medical attention and antibiotics, with additional drainage sometimes necessary.
Perforation is a rare but serious complication in which a tear develops in the digestive tract or duct. It can cause severe abdominal pain, fever, and other signs of infection and may require urgent treatment.
Sedation Used During an ERCP
Sedation or anesthesia is used during ERCP to keep the patient comfortable and still throughout the procedure.
The level of sedation is usually deeper than what is used for many routine upper endoscopies or colonoscopies. Some patients receive deep sedation, while others may receive general anesthesia.
With deep sedation, the patient is deeply asleep but may continue breathing independently. With general anesthesia, the patient is completely unconscious and may need assistance with breathing.
The medical team chooses the appropriate approach based on factors such as overall health, the expected length and complexity of the procedure, and local medical protocols.
An anesthesia professional monitors the patient throughout the ERCP, including heart rate, blood pressure, breathing, and oxygen levels.
Further Considerations and Alternatives for ERCP
The Difference Between a Diagnostic and a Therapeutic ERCP
A diagnostic ERCP is used primarily to examine and image the bile and pancreatic ducts. A therapeutic ERCP goes further by treating a problem discovered during the procedure.
In the past, ERCP was more commonly used for diagnosis. Today, non-invasive or less invasive tests such as MRCP and EUS can often provide the information doctors need without requiring duct instrumentation.
As a result, ERCP is now generally reserved for situations in which treatment is likely to be needed.
A therapeutic ERCP begins with the same imaging process. Once a problem is identified, the doctor can use specialized instruments passed through the endoscope to treat it.
This ability to diagnose and treat during the same session is one of the major advantages of ERCP.
An ERCP and An MRCP (Magnetic Resonance Cholangiopancreatography)
The main difference between ERCP and MRCP is that ERCP is an invasive procedure that can both diagnose and treat conditions, while MRCP is a non-invasive imaging test used for diagnosis.
MRCP uses MRI technology to produce detailed images of the liver, gallbladder, bile ducts, and pancreas. It does not require an endoscope and does not expose the patient to X-ray radiation.
MRCP can help identify conditions such as:
- Bile duct stones
- Strictures
- Tumors
- Other abnormalities of the duct system
ERCP requires sedation or anesthesia and involves passing an endoscope through the mouth into the small intestine. Contrast dye and X-ray imaging are used to visualize the ducts.
While MRCP is useful for identifying problems, ERCP has the added advantage of allowing doctors to treat certain problems immediately.
What types of treatments can be performed during an ERCP?
ERCP can be used to perform several treatments directly inside the bile and pancreatic ducts.
One common treatment is a sphincterotomy, in which the doctor makes a small incision in the sphincter of Oddi. This opens the duct entrance and makes it easier to remove stones or other material.
If a gallstone has moved into the common bile duct, the doctor can use a small basket or balloon catheter to capture and remove it.
A stent may be inserted when a duct has become narrowed because of scar tissue, inflammation, or a tumor. The stent helps hold the duct open so bile or pancreatic fluid can drain more normally.
For strictures, a balloon can be inserted and inflated at the narrowed area to widen the passage. A stent may then be placed to help maintain the opening.
If the doctor finds a suspicious mass or narrowing, a brush or forceps can sometimes be used to collect cells or tissue for laboratory analysis.
Follow-up Care After a Therapeutic ERCP
Follow-up care after a therapeutic ERCP helps ensure that the treatment worked and that any complications are identified early.
Immediately after the procedure, you will be monitored while the sedation wears off. Most people can return home the same day, although an overnight stay may be recommended after a complex procedure or when additional monitoring is needed.
During the following days, pay attention to symptoms that could indicate a complication. Contact your doctor or seek urgent medical attention if you develop:
- Increasing abdominal pain
- Fever or chills
- Persistent vomiting
- New or worsening jaundice
A follow-up appointment may be scheduled to review the ERCP findings, discuss biopsy results if tissue was collected, and determine the next stage of treatment.
Long-term follow-up depends on the condition being treated. If a plastic stent is placed, it may need to be removed or replaced because it can become blocked over time. The timing depends on the individual situation and the type of stent used.
People being treated for chronic pancreatitis, bile duct strictures, or other ongoing conditions may need additional imaging or repeat procedures.
Your doctor may also recommend dietary changes depending on the reason for the ERCP. For example, a lower-fat diet may be suggested for some people with gallstone-related problems or pancreatitis.
FAQs
1. Is ERCP a big surgery?
No. ERCP is not considered traditional major surgery because it does not require an external incision. Instead, it is an invasive endoscopic procedure.
A gastroenterologist guides a flexible endoscope through the mouth and into the small intestine while the patient receives sedation or anesthesia.
Although there are no external surgical cuts, ERCP can involve delicate treatment inside the bile and pancreatic ducts. For this reason, it is performed in a specialized medical setting with a trained healthcare team.
2. How long does it take to recover from an ERCP procedure?
The initial recovery from an ERCP is usually fairly short, although the exact timeline varies from person to person.
After the procedure, you will typically spend one to two hours in a recovery area while the sedation wears off.
A mild sore throat, bloating, and gas may occur during the first day or two. Many people return to light activities within a couple of days, but your doctor will provide specific instructions about exercise, lifting, and other activities.
3. Can ERCP remove gallstones?
Yes. ERCP can remove gallstones that have moved out of the gallbladder and become lodged in the common bile duct.
Gallstones that remain inside the gallbladder cannot usually be removed through ERCP. However, stones trapped in the bile ducts can often be removed using a sphincterotomy followed by a small balloon or basket catheter.
The removed stones are passed into the small intestine and then leave the body through the digestive system.
4. What size stone can ERCP remove?
ERCP can commonly remove bile duct stones that are smaller than 1 centimeter using standard balloons or baskets.
Larger stones, including those measuring between 1 and 2 centimeters, can also sometimes be removed. In these cases, additional techniques may be needed to break the stone into smaller pieces before extraction.
Stones larger than 2 centimeters can be more difficult to remove and may require more than one procedure or temporary stent placement.
5. What foods should I avoid after ERCP?
After an ERCP, it may be helpful to avoid heavy, greasy, fried, or high-fat foods, especially during the first day or two.
Instead, choose simple, easy-to-digest foods such as:
- Toast
- Rice
- Broth
- Plain chicken
- Applesauce
Follow the dietary instructions provided by your medical team, since recommendations can vary depending on why the ERCP was performed and whether any complications occurred.
Alcohol should also be avoided while the effects of sedation or anesthesia are still present.
6. What are the side effects of ERCP?
Mild side effects may include:
- Sore throat
- Bloating
- Gas discomfort
These symptoms are often temporary.
The most important complication to watch for is acute pancreatitis, which can cause significant abdominal pain, nausea, and vomiting. Other possible complications include bleeding, bile duct infection, and perforation.
Severe or worsening symptoms after ERCP should be reported to your medical team promptly.
7. Can I go home after ERCP?
Yes. Many ERCP procedures are performed on an outpatient basis, so patients can return home the same day.
However, sedation or general anesthesia can temporarily affect coordination and judgment. You will need a responsible adult to drive you home and follow any additional instructions from your medical team.
An overnight hospital stay may be recommended when the procedure is complex, a complication occurs, or additional monitoring is needed.
8. Is ERCP usually successful?
ERCP has a high clinical success rate, particularly when performed by an experienced specialist. It can be highly effective for treating bile duct blockages, removing trapped stones, and opening narrowed ducts.
Sometimes the first attempt may not fully resolve the problem because of factors such as unusual anatomy or a difficult stone. In these situations, the medical team may consider another ERCP or other advanced techniques.
9. How long can you survive with a blocked bile duct?
A completely blocked bile duct can become a serious medical emergency and should not be left untreated.
When bile cannot drain properly, bilirubin can build up and cause severe jaundice. A major concern is acute cholangitis, a potentially life-threatening infection that can develop when bacteria grow in an obstructed biliary system.
The outcome depends on the cause and severity of the blockage. Some partial or slowly developing obstructions may progress more gradually, but medical evaluation and appropriate drainage are important to prevent serious complications.
Conclusion
An ERCP can understandably feel intimidating, especially when you first hear the name of the procedure. However, understanding how it works can make the experience easier to approach.
Unlike a test that only provides images, ERCP allows doctors to identify and treat certain problems involving the bile and pancreatic ducts during the same procedure. It can be used to remove trapped gallstones, open narrowed ducts, place stents, and address other blockages without requiring an external surgical incision.
The procedure does involve preparation, sedation, and a period of recovery, and it carries potential risks such as pancreatitis, bleeding, infection, and perforation. Your healthcare team will monitor you closely and provide instructions to help reduce these risks.
Knowing what to expect before, during, and after an ERCP can help you feel more prepared. If your doctor has recommended this procedure, follow their specific instructions about fasting, medications, transportation, recovery, and when to seek medical attention.

