For ulcerative colitis not controlled by medical treatment, or for familial adenomatous polyposis, the colon and rectum can be removed and an ileal pouch made from the terminal ileum and joined to the anus (ileal pouch–anal anastomosis). It avoids a permanent stoma. It is often done in two or three stages, starting with subtotal colectomy and ileostomy in acute colitis.
Patients typically pass stool 4–6 times a day. Complications include pouchitis (treated with antibiotics), pouch leak, small bowel obstruction, reduced fertility in women, and pouch failure in about 10% over the long term. Pouch surgery is generally avoided in Crohn's disease because of the high failure rate.