A type of excretory organ found in many invertebrates, consisting of a simple or branched tube, formed by the ingrowth of ectoderm, with cilia at the inner end. Excretory products diffuse into the nephridium and are wafted to the exterior by ciliary action. The simplest type is known as a protonephridium and consists of a tubule and its associated flame cell; networks of protonephridia occur in flatworms (see platyhelminthes) and rotifers. The paired metanephridia of the earthworm and some other annelids superficially resemble kidney tubules.