The rectum acts as a temporary storage facility for the waste material. As the rectal walls expand due to the materials filling it from within, stretch receptors from the nervous system located in the rectal walls stimulate the desire to defecate. If the urge is not acted upon, the material in the rectum is often returned to the colon where more water is absorbed. If defecation is delayed for a prolonged period constipation and hardened feces results.
When the rectum is full the increase in intrarectal pressure forces the walls of the anal canal apart allowing the fecal matter to enter the canal. The rectum shortens as material is forced into the anal canal and peristaltic waves propel the feces out of the rectum. The internal and external sphincters of the anus allow the feces to be passed by muscles pulling the anus up over the exiting feces.
During defecation the chest muscles, diaphragm, abdominal wall muscles, and pelvic diaphragm all exert pressure on the digestive tract and respiration temporarily ceases as the lungs push the chest diaphragm down in order to exert pressure. Blood pressure rises throughout the body and the amount of blood pumped by the heart decreases. Death has been known to occur in cases where defecation causes the blood pressure to rise enough to cause the rupture of an aneurysm or to dislodge blood clots (see thrombosis).
Defecation may be involuntary or under voluntary control. Loss of control may be caused by bodily injuries, pain, fear, a change in temperature, and psychological or neurological factors. See fecal incontinence for a discussion of this.
See also toilet.