Mixotrophy is the occurrence of phagotrophy and phototrophy in the same organism. In ciliates the intracellular phototroph can be unicellular green algae (zoochlorellae), dinoflagellates (zooxanthellae), cryptomonads or sequestered chloroplasts from ingested algae. An intermediate mixotrophic mechanism is that where the phagotroph ingests algal cells, maintains them intact and functional in the cytoplasm for some time, but the algae are afterwards digested. This seems to occur in some species of Mesodinium. Ciliates with phototrophic endosymbionts have evolved independently in marine and freshwater habitats. The enslaved algal cells or chloroplasts provide host cells with organic matter. Mixotrophs flourish in oxygen-rich, but also in micro-aerobic waters and in the complete absence of oxygen. In the latter case, the aerobic host retains aerobic metabolism, sustained by the oxygen produced by the phototrophic endosymbionts or the sequestered chloroplasts. Mixotrophic ciliates can attain spectacular abundances in some habitats, and entirely dominate the ciliate community.