ERCP stands for endoscopic retrograde cholangiopancreatography. A dye is injected into the bile and pancreatic ducts using a flexible, video endoscope. Then x-rays are taken to outline the bile and pancreas ducts.

The liver produces bile, which flows through the ducts, passes or fills the gallbladder and then enters the intestine (duodenum) just beyond the stomach. The pancreas, which is six to eight inches long, sits behind the stomach. This organ secretes digestive enzymes that flow into the intestine through the same opening as the bile. It also produces hormones, like insulin, that regulate metabolism.  Both bile and enzymes are needed to digest food.


The flexible endoscope can be directed and moved around the many bends in the upper gastrointestinal tract. The endoscopes have a tiny, optically sensitive computer chip at the end. Electronic signals are then transmitted up the scope to the computer which then displays the image on a large video screen. An open channel in the scope allows other instruments to be passed through it to perform biopsies, inject solutions, make incisions or place stents.  A second, smaller scope, or cholangioscope can also be inserted into the ducts to guide biopsies or fragment stones.

Reasons for the Exam

The bile ducts, gallbladder and pancreas are subject to a variety of medical conditions. ERCP helps in diagnosing and treating these disorders.

ERCP may be used for:

  • Gallstones, which are trapped in the main bile duct
  • Blockage of the bile duct or pancreatic duct
  • Cancer of the bile ducts or pancreas
  • Pancreatitis (inflammation of the pancreas)
  • Infections of the bile ducts
  • Leaks of the bile duct or pancreatic duct


The only preparation needed before an ERCP is to not eat or drink for eight hours prior to the procedure. You may be asked to stop certain medications such as blood thinners before the procedure. Check with the physician.

The Procedure

An ERCP uses x-ray and is performed in a room specially equipped for x-rays. The patient is positioned on his or her stomach or left side with the head turned to the right. The patient is sedated and a piece of plastic placed in the mouth to keep the mouth open. The endoscope is then gently inserted into the upper esophagus. The patient breathes easily throughout the exam.   A thin tube is inserted through the endoscope to the main bile duct or pancreatic duct. Dye is then injected into this bile duct and/or the pancreatic duct and x-ray films are taken. If a gallstone is found, steps may be taken to remove it. An incision can be made using a specialized electrical cutting device. Narrowed or blocked ducts can be opened with small tubing, called stents. The exam takes from 20 to 40 minutes, but could take up to an hour or more, depending on the complexity of the procedure, after which the patient is taken to the recovery area for observation.


After the exam, the physician explains the results. If the effects of the sedatives are prolonged, the physician may suggest an appointment for a later date when the patient can fully understand the results.  It is helpful to have a relative or trusted friend to would be able to hear the results.


An ERCP is performed primarily to identify and/or correct a problem in the bile ducts or pancreas. This means the test enables a diagnosis to be made upon which specific treatment can be given. If a gallstone is found during the exam, it can often be removed, eliminating the need for major surgery. If a blockage in the bile duct causes yellow jaundice or pain, it can be relieved.

Alternative Testing

ERCP is now largely a therapeutic procedure and reserved for situations where an abnormality is expected. Alternatives include a special MRI of the bile ducts (MRCP), which enables inspection of the bile ducts without the risk of ERCP.  Endoscopic Ultrasound, CT-scan and nuclear medicine x-rays are other ways to evaluate the bile ducts and pancreas. In addition, dye can be injected into the bile ducts by placing a needle through the skin and into the liver. Small tubing can then be threaded into the bile ducts.  In this situation, a drainage tube may remain in the upper abdomen.  

Side Effects and Risks

A temporary, mild sore throat sometimes occurs after the exam. Serious risks with ERCP are relatively uncommon. There is a chance the pancreas can become inflamed (pancreatitis).  Pancreatitis can be mild with a brief period of abdominal pain, or severe and in rare instances fatal.  It is important to understand this risk before proceeding with an ERCP. Other risks include bleeding, especially if an incision is necessary, perforation (creating a hole or infection). These complications may require hospitalization and, rarely, surgery.

It is important to tell your physician if you are pregnant or if you have had prior reactions to contrast agents, or anesthesia.

Due to medication, the patient should not drive or operate machinery for 12 hours following the exam. For this reason, a driver should accompany the patient to the exam.

Scroll to Top