 When the rectum is full, an increase in pressure within the rectum forces apart the walls of the anal canal, allowing the fecal matter to enter the canal.The rectum shortens as material is forced into the anal canal and peristaltic waves push the feces out of the rectum.The internal and external anal sphincters along with the puborectalis muscle allow the feces to be passed by muscles pulling the anus up over the exiting feces.