If you're diagnosed with peritonitis, you'll be admitted to hospital so you can be carefully monitored.
This is because there is a risk of serious complications of peritonitis, such as blood poisoning.
The initial treatment for peritonitis involves injections of antibiotics or antifungal medicines. This usually lasts 10 to 14 days.
If your peritonitis was caused by peritoneal dialysis, antibiotics may be injected directly into the peritoneum. Research has shown this is more effective than injecting antibiotics into a vein.
You'll also need to use an alternative method of dialysis until the peritonitis has been successfully treated. You may also be given painkilling medication if you are in pain.
Many people with peritonitis have problems digesting food, so a feeding tube may be needed.
The feeding tube is either passed into your stomach through your nose (nasogastric tube) or surgically placed into your stomach through your stomach.
If these are unsuitable, nutrition may be given directly into one of your veins (parenteral nutrition).
If part of the tissue of the peritoneum has been seriously damaged by infection, it may need to be surgically removed.
Some people develop abscesses (pus-filled swellings) in their peritoneum that need to be drained with a needle. This is carried out using an ultrasound scanner to guide the needle to the abscess. Local anaesthetic is usually used so you don't feel any pain.
Read more about treating abscesses.
The cause of peritonitis may also need to be surgically treated. For example, if a burst appendix caused your peritonitis, your appendix will need to be removed.
Read more about treating appendicitis.