text: Plastids are thought to be descended from endosymbiotic cyanobacteria. The primary endosymbiotic event of the Archaeplastida is hypothesized to have occurred around 1.5 billion years ago and enabled eukaryotes to carry out oxygenic photosynthesis. Three evolutionary lineages in the Archaeplastida have since emerged in which the plastids are named differently: chloroplasts in green algae and/or plants, rhodoplasts in red algae, and muroplasts in the glaucophytes. The plastids differ both in their pigmentation and in their ultrastructure. For example, chloroplasts in plants and green algae have lost all phycobilisomes, the light harvesting complexes found in cyanobacteria, red algae and glaucophytes, but instead contain stroma and grana thylakoids. The glaucocystophycean plastid—in contrast to chloroplasts and rhodoplasts—is still surrounded by the remains of the cyanobacterial cell wall. All these primary plastids are surrounded by two membranes.
  The plastid of photosynthetic Paulinella species is often referred to as the cyanelle or chromatophore, and had a much more recent endosymbiotic event about 90–140 million years ago; it is the only known primary endosymbiosis event of cyanobacteria outside of the Archaeplastida. The plastid belongs to the "PS-clade" (of the cyanobacteria genera Prochlorococcus and Synechococcus), which is a different sister clade to the plastids belonging to the Archaeplastida.
  In contrast to primary plastids derived from primary endosymbiosis of a prokaryoctyic cyanobacteria, complex plastids originated by secondary endosymbiosis in which a  eukaryotic organism engulfed another eukaryotic organism that contained a primary plastid. When a eukaryote engulfs a red or a green alga and retains the algal plastid, that plastid is typically surrounded by more than two membranes. In some cases these plastids may be reduced in their metabolic and/or photosynthetic capacity.  Algae with complex plastids derived by secondary endosymbiosis of a red alga include the heterokonts, haptophytes, cryptomonads, and most dinoflagellates (= rhodoplasts). Those that endosymbiosed a green alga include the euglenids and chlorarachniophytes (= chloroplasts). The Apicomplexa, a phylum of obligate parasitic alveolates including the causative agents of malaria (Plasmodium spp.), toxoplasmosis (Toxoplasma gondii), and many other human or animal diseases also harbor a complex plastid (although this organelle has been lost in some apicomplexans, such as Cryptosporidium parvum, which causes cryptosporidiosis).  The apicoplast is no longer capable of photosynthesis, but is an essential organelle, and a promising target for antiparasitic drug development.
  Some dinoflagellates and sea slugs, in particular of the genus Elysia, take up algae as food and keep the plastid of the digested alga to profit from the photosynthesis; after a while, the plastids are also digested. This process is known as kleptoplasty, from the Greek, kleptes (), thief.