Defecation is the final act of digestion, by which organisms eliminate solid, semisolid, or liquid waste material from the digestive tract via the anus.