Peritonitis is a medical condition that is characterized by an inflammation of the peritoneum. The peritoneum is a thin layer of tissue that lines the abdominal organs and inside of the abdominal wall. The inflammation is caused by a bacterial or fungal infection of this membrane. There are 2 types of peritonitis: primary and secondary. Primary peritonitis is caused by the spread of an infection from the blood and lymph nodes to the peritoneum. The most common cause of primary peritonitis is liver disease. Secondary peritonitis is the more common type of peritonitis. It is caused when the infection spreads into the peritoneum from the gastrointestinal or biliary tract. Peritonitis can also be acute or chronic. Acute peritonitis is a sudden inflammation of the peritoneum whereas chronic peritonitis is a longstanding inflammation of the peritoneum. Peritonitis is a life-threatening emergency that requires immediate medical treatment. The infection stops the normal movements of the intestines (peristalsis). The body quickly becomes dehydrated, and important chemicals called electrolytes are dangerously disturbed. A person with untreated peritonitis can die within a few days.