The anus (from Latin anus, meaning "ring, anus", which is from the Proto-Indo-European ano–, meaning "ring" ) is an opening at the opposite end of an animal's digestive tract from the mouth. Its function is to control the expulsion of feces,
unwanted semi-solid matter produced during digestion, which, depending
on the type of animal, may include: matter which the animal cannot
digest, such as bones;[1] food material after all the nutrients have been extracted, for example cellulose or lignin; ingested matter which would be toxic if it remained in the digestive tract; and dead or excess gut bacteria and other endosymbionts.
Amphibians, reptiles, and birds use the same orifice (known as the cloaca) for excreting liquid and solid wastes, and for copulation and egg-laying. Monotreme mammals also have a cloaca, which is thought to be a feature inherited from the earliest amniotes via the therapsids. Marsupials have a single orifice for excreting both solids and liquids and, in females, a separate vagina for reproduction. Female placental mammals have completely separate orifices for defecation, urination,
and reproduction; males have one opening for defecation and another for
both urination and reproduction, although the channels flowing to that
orifice are almost completely separate.
The development of the anus was an important stage in the evolution
of multicellular animals. It appears to have happened at least twice,
following different paths in protostomes and deuterostomes. This accompanied or facilitated other important evolutionary developments: the bilaterian body plan, the coelom, and metamerism, in which the body was built of repeated "modules" which could later specialize, such as the heads of most arthropods, which are composed of fused, specialized segments.