ERCP
ERCP, or endoscopic retrograde cholangiopancreatography, is an endoscopic procedure that allows doctors to look inside the bile and pancreatic ducts and treat problems such as stuck gallstones, narrowing, blockages, leaks, and infection.…

Quick answer
ERCP (endoscopic retrograde cholangiopancreatography) is a procedure that uses a flexible endoscope passed through the mouth plus X-ray imaging to examine and treat blockages, stones, leaks, or narrowing in the bile and pancreatic ducts. It is usually done under deep sedation or general anesthesia, takes about 30 to 90 minutes, and most people recover within one to two days.
What is ERCP?
ERCP stands for endoscopic retrograde cholangiopancreatography. It is a procedure that combines an endoscope (a thin, flexible tube with a camera and light) with X-ray imaging to examine and treat problems in the bile ducts, the pancreatic duct, and the gallbladder drainage system. The bile ducts are the small tubes that carry bile (a digestive fluid made by the liver) from the liver and gallbladder to the small intestine. The pancreatic duct carries digestive enzymes from the pancreas into the same area of the intestine. Both ducts open into the duodenum, the first part of the small intestine, through a small opening called the papilla.
During an ERCP procedure, the doctor passes the endoscope through the mouth, down the esophagus (food pipe), through the stomach, and into the duodenum. A small catheter is then guided into the ducts, a contrast dye is injected, and X-ray pictures are taken. The word retrograde simply means the dye is injected in the opposite direction to the normal flow of bile. Because instruments can be passed through the endoscope, ERCP is used mainly as a treatment rather than only as a way to look. In hospitals, ERCP is usually performed by a gastroenterologist (a doctor who specializes in the digestive system) with advanced endoscopy training, often within a gastroenterology department.
Conditions in which ERCP is commonly used include:
- Gallstones that have moved out of the gallbladder and become stuck in the bile duct.
- Narrowing of the bile duct or pancreatic duct, called a stricture, caused by scarring, inflammation, or a tumor.
- Blockage of the bile duct by a tumor of the pancreas, bile duct, or nearby area, where a small tube called a stent can be placed to keep bile flowing.
- Bile leaks after gallbladder surgery or liver surgery.
- Certain forms of pancreatitis (inflammation of the pancreas), including complications such as fluid collections or stones in the pancreatic duct.
- Sphincter of Oddi dysfunction, a problem with the muscle valve at the papilla, in selected cases.
Who is a candidate
Deciding who needs ERCP depends on whether there is a strong reason to believe the bile or pancreatic ducts are blocked, leaking, or narrowed, and whether treatment through the endoscope is likely to help. Because ERCP carries more risk than purely diagnostic imaging, doctors generally reserve it for situations where treatment is expected, not just for taking pictures.
Common indications include:
- Jaundice (yellowing of the skin and eyes) with imaging or blood tests suggesting a blocked bile duct.
- Cholangitis, an infection of the bile duct that often causes fever, pain, and jaundice, and usually needs urgent drainage.
- Gallstone pancreatitis when a stone remains stuck in the bile duct.
- Known bile duct stones seen on ultrasound, CT, or MRI.
- Placement, exchange, or removal of biliary or pancreatic stents.
- Obtaining tissue samples (brushings or biopsies) from a suspected narrowing in the duct.
ERCP may not be suitable, or may be postponed, in some situations. It is generally not used simply to diagnose a problem when a non-invasive test such as MRCP (magnetic resonance cholangiopancreatography, an MRI scan of the ducts) or endoscopic ultrasound can answer the question with less risk. It may be technically difficult or impossible if previous stomach or intestinal surgery has changed the anatomy, if there is a blockage in the esophagus or stomach that the endoscope cannot pass, or if the papilla cannot be reached. People with severe heart or lung disease may need extra assessment before sedation. A known allergy to the contrast dye, uncorrected bleeding problems, or use of blood-thinning medicines may require adjustments rather than cancellation. Pregnancy is not an absolute barrier, but the team will take special steps to limit radiation exposure. Your doctor weighs these factors against the seriousness of the duct problem.
How the procedure works
The ERCP procedure follows a broadly similar pattern in most hospitals, although details vary.
Before the procedure. You will meet the endoscopy team, confirm your medical history, medicines, and allergies, and sign a consent form. A small intravenous (IV) line is placed in a vein, usually in the arm or hand, so that fluids and sedative medicines can be given. Monitoring pads are attached to track your heart rate, blood pressure, and oxygen levels. Many centers give a rectal anti-inflammatory medicine before or after the procedure to lower the risk of pancreatitis, if it is appropriate for you.
During the procedure. You lie on an X-ray table, usually on your left side or partly on your stomach. Most ERCP is done under deep sedation or general anesthesia given by an anesthesia specialist, so you are asleep or nearly asleep and typically remember little or nothing. A mouth guard protects your teeth. The doctor passes the endoscope through the mouth into the duodenum and finds the papilla. A fine catheter is threaded into the bile or pancreatic duct, contrast dye is injected, and X-ray images show the shape of the ducts and any stones, narrowing, or leaks.
Depending on what is found, the doctor may then perform one or more treatments through the endoscope:
- Sphincterotomy: a small cut in the muscle of the papilla to widen the opening and allow stones to pass or instruments to enter.
- Stone removal: using a small balloon or a wire basket to pull stones out of the duct into the intestine.
- Stenting: placing a plastic or metal tube across a narrowed or blocked area to keep it open.
- Balloon dilation: stretching a narrowed segment.
- Tissue sampling: brushing or biopsying a suspicious area for laboratory analysis.
The procedure often takes about 30 to 90 minutes, depending on how complex the treatment is.
After the procedure. You are moved to a recovery area and monitored until the sedation wears off, usually for one to a few hours. Some people feel bloated, have a mild sore throat, or notice mild abdominal discomfort. The doctor or nurse will usually explain the main findings before you leave, and full results, including any laboratory results from biopsies, may take several days.
Preparation for ERCP
Good preparation helps the procedure go smoothly and lowers the chance of problems with sedation. Instructions differ between hospitals, so follow the specific guidance you are given. Typical steps include:
- Fasting: you will usually be asked not to eat for about six to eight hours before the procedure and to stop clear liquids a couple of hours before, so your stomach is empty.
- Medicines: tell the team about all prescription and over-the-counter medicines, supplements, and herbal products. Blood thinners such as warfarin, clopidogrel, or newer anticoagulants may need to be paused or adjusted, but only on your doctor’s instructions. Diabetes medicines may also need adjusting because you will be fasting.
- Allergies: mention any previous reaction to contrast dye, iodine, latex, or sedative and anesthetic drugs.
- Health conditions: heart, lung, or kidney problems, previous abdominal surgery, and pregnancy or possible pregnancy are all important to report.
- Transport: because of the sedation, you should not drive, cycle, operate machinery, or make important decisions for the rest of the day. Arrange for an adult to take you home and, ideally, stay with you overnight if you are treated as an outpatient.
- Practical items: leave jewelry and valuables at home, remove dentures and contact lenses before the procedure, and bring a list of your medicines.
You may have blood tests beforehand to check liver function, clotting, and kidney function, and you will usually already have had an ultrasound, CT, or MRI scan that showed the reason for the ERCP.
Recovery and aftercare
ERCP recovery time is usually short compared with open surgery, because there is no external incision. Still, the body needs time to recover from sedation and from any cutting, stretching, or stenting inside the ducts.
The first few hours. You rest in a recovery area while nurses check your blood pressure, pulse, and oxygen levels. Once you are awake, able to drink, and your pain is under control, you may go home the same day if the procedure was straightforward. Many patients who have ERCP for an infected bile duct, severe pancreatitis, or other complex problems stay in the hospital for one or more nights so that they can be observed and treated with IV fluids or antibiotics.
The first day or two. A sore throat, mild bloating, gas, or mild abdominal tenderness are common and typically settle within a day or two. Most people can start with clear fluids and then a light diet within a few hours, unless the doctor advises otherwise. Sedation can leave you feeling tired or forgetful for the rest of the day, so plan to rest.
Returning to normal activities. Many patients feel able to return to light daily activities, including desk work, within one to two days. Heavier physical work or exercise is often reasonable after a few days if you feel well, but follow your doctor’s advice, particularly if a sphincterotomy was performed or if you take blood thinners that are being restarted.
Follow-up. If a plastic stent was placed, it usually needs to be removed or exchanged after a set period, often within about three months, because plastic stents can become blocked. Metal stents may stay in place longer. Your doctor will explain what type of stent you have and when to return. If gallstones were removed from the bile duct, surgery to remove the gallbladder is often recommended later to reduce the chance of further stones, and this is a separate decision made with your surgical team.
Risks and side effects
Any honest discussion of ERCP risks and benefits should note that ERCP is one of the more complex endoscopic procedures, and complications are more common than with a standard gastroscopy or colonoscopy. Most people have no serious problem, but knowing the possible complications helps you recognize them early.
- Post-ERCP pancreatitis: the most common complication. It causes abdominal pain, often with nausea and vomiting, usually within the first day. Most cases are mild and settle with fluids and pain relief in the hospital, but severe cases can occur. Preventive medicines and careful technique are used to lower the risk.
- Bleeding: mainly after a sphincterotomy. It may be noticed during the procedure and treated immediately, or it can appear later as black stools or vomiting blood.
- Infection: including cholangitis (bile duct infection), especially if the duct could not be fully drained, and rarely infection of the gallbladder.
- Perforation: a tear in the wall of the duodenum or duct. This is uncommon but can be serious and sometimes needs surgery.
- Sedation and anesthesia effects: breathing or heart problems, allergic reactions, or reactions to the contrast dye.
- Stent problems: stents can become blocked or move out of position, causing symptoms to return.
- Radiation exposure: generally low, but relevant for repeated procedures and in pregnancy.
- Incomplete procedure: in some cases the duct cannot be entered or the stone cannot be removed, and another approach is needed.
Risk is higher in certain groups, such as younger people with normal-sized ducts, those with suspected sphincter of Oddi dysfunction, people with previous pancreatitis, and when the procedure is technically difficult. Your doctor should discuss how these factors apply to you.
Results and outlook
For its main uses, ERCP is generally considered effective. It clears bile duct stones in the large majority of cases, often in a single session, although large or difficult stones sometimes need more than one procedure or additional techniques. In people with a blocked bile duct from a tumor, stenting usually relieves jaundice and itching and can make it possible to proceed with other treatments such as surgery or chemotherapy. For cholangitis, urgent drainage is an important part of treatment alongside antibiotics. For bile leaks after surgery, placing a stent typically allows the leak to heal without further operation.
The longer-term outlook depends far more on the underlying condition than on the procedure itself. Gallstone disease is usually fully treated once stones are cleared and, where recommended, the gallbladder is removed. Narrowings caused by a tumor may need repeat stent changes over time, and the overall outlook is guided by the cancer diagnosis and its treatment. Chronic pancreatitis and benign strictures may need repeated procedures over months or years. ERCP is one tool within a broader care plan, and your specialist can explain what the findings mean for you.
Cost considerations
The cost of ERCP varies widely between hospitals and health systems, so it is not possible to give a single figure. Factors that commonly influence the total include:
- Whether the procedure is done as a day case or requires one or more nights in the hospital.
- The type of anesthesia and the involvement of an anesthesia specialist.
- Devices used during the procedure, such as plastic or metal stents, balloons, baskets, and disposable catheters; metal stents are generally more expensive than plastic ones.
- Laboratory analysis of tissue samples.
- Imaging before the procedure, such as ultrasound, CT, or MRCP.
- Treatment of any complication, which may extend the hospital stay.
- Follow-up appointments and planned repeat procedures, such as stent exchange.
Insurance coverage and referral requirements differ by country and policy, so it is sensible to ask the hospital’s administrative team for a written estimate that lists what is and is not included.
Frequently asked questions
Is an ERCP procedure painful?
Because ERCP is performed under deep sedation or general anesthesia, most people feel nothing during the procedure and remember little of it. Afterward, a sore throat, bloating, and mild abdominal tenderness are common but usually mild. Significant or worsening pain after the procedure is not expected and should be reported promptly, as it can be a sign of pancreatitis or another complication.
How long is the ERCP recovery time?
Many patients recover from the sedation within a few hours and can go home the same day, returning to light activities within one to two days. Those admitted for infection, pancreatitis, or complex treatment often stay one or more nights. Full recovery from the underlying illness may take longer, and your doctor will give guidance based on what was found and treated.
Who needs ERCP rather than a scan?
Scans such as ultrasound, CT, and MRCP can show whether ducts are blocked, but they cannot remove stones or place stents. ERCP is generally recommended when treatment inside the ducts is needed, for example for stuck gallstones, cholangitis, or a blockage causing jaundice. When the question is only diagnostic, doctors often prefer a scan first because it avoids the risks of ERCP.
What are the main ERCP risks and benefits to weigh?
The main benefit is relief of a duct blockage, leak, or infection without open surgery, often with a short recovery. The main risks are pancreatitis, bleeding, infection, and, rarely, perforation, along with the general risks of sedation. In many cases the condition being treated is itself serious, so the benefit is felt to outweigh the risk, but this balance should be discussed individually with your specialist.
Can I eat and drink after ERCP?
Most people can start with clear fluids once fully awake and progress to a light meal within a few hours if they feel well and the doctor has not advised otherwise. If pancreatitis is suspected or you have been admitted for observation, you may be asked to wait longer or receive fluids through a vein for a time.
Will I need ERCP again?
It depends on the reason for the procedure. A single ERCP may be enough to clear gallstones, whereas people with stents usually need a planned repeat procedure to remove or exchange them. Some conditions, such as strictures from chronic pancreatitis or tumors, may require ongoing procedures over time. Your doctor will outline the expected plan before you leave.
Does ERCP remove the gallbladder?
No. ERCP works inside the bile ducts and does not remove the gallbladder. If gallstones have been cleared from the duct, a separate operation called cholecystectomy (removal of the gallbladder) is often recommended afterward to lower the chance of new stones moving into the duct. This is a separate decision made with your care team.
When to see a doctor
You should be assessed by a doctor, and possibly a gastroenterology specialist, if you develop symptoms that may point to a problem in the bile or pancreatic ducts. These include yellowing of the skin or eyes, dark urine together with pale or clay-colored stools, persistent itching without a rash, pain in the upper right abdomen or upper middle abdomen that spreads to the back, unexplained fever with abdominal pain, or unintentional weight loss with any of these features. People who have had gallstones, gallbladder surgery, or pancreatitis in the past should be especially alert to these symptoms.
After an ERCP, seek urgent medical attention if you notice any of the following, as they can indicate a complication that needs prompt treatment:
- Severe or worsening abdominal pain, especially with nausea or vomiting.
- Fever, chills, or shaking.
- Vomiting blood or material that looks like coffee grounds.
- Black, tarry, or bloody stools.
- New or worsening yellowing of the skin or eyes.
- Difficulty breathing, chest pain, or a swollen, hard abdomen.
- Inability to keep fluids down.
Mild symptoms that do not improve after two or three days, or symptoms that return weeks or months later, such as jaundice or fever in someone with a stent, also warrant contact with the team that performed the procedure, because a blocked or displaced stent can often be corrected before serious infection develops.
Preparation
- Do not eat for about six to eight hours before the procedure and stop clear liquids as instructed. Tell the team about all medicines, especially blood thinners and diabetes drugs, and about any allergies to contrast dye or sedatives. Arrange for an adult to take you home because you will not be able to drive after sedation.
Aftercare
- Rest for the remainder of the day and avoid driving or important decisions until the sedation has fully worn off. Start with clear fluids and progress to a light diet if you feel well and your doctor agrees. Watch for severe abdominal pain, fever, vomiting, or black or bloody stools and seek urgent care if they occur. Keep any follow-up appointment for stent removal or exchange.
Update history
- PublishedSeptember 13, 2026
- Last content updateSeptember 13, 2026
References2
Doctors Performing This Treatment

Türker Egesel, MD
Gastroenterology
Mustafa Yalçın, MD
Gastroenterology
Mustafa Süveran, MD
Gastroenterology
Murat Öksüz, MD
Gastroenterology
Fatma Seçil Kırdök, MD
Gastroenterology
Ercan Biçakci, MD
Gastroenterology
Alp Mustafa Günay, MD
Gastroenterology
Assoc. Prof. Diğdem Özer, MD
Gastroenterology
Prof. Yusuf Serdar Sakin, MD
Gastroenterology
Prof. Yaşar Çolak, MD
Gastroenterology
Prof. Hakan Yıldız, MD
Gastroenterology
Prof. Fatih Oğuz Önder, MD
Gastroenterology
Prof. Erkin Öztaş, MD
Gastroenterology
Prof. Can Gönen, MD
Gastroenterology
Prof. Bahattin Çiçek, MD
Gastroenterology
Prof. Ahmet Karaman, MD
GastroenterologyMedical Units
Available at These Hospitals












