According to the endosymbiotic theory, the first eukaryotic cells evolved from a symbiotic relationship between two or more prokaryotic cells. They evolved into the mitochondria of eukaryotic cells. Some of the small cells were cyanobacteria. They were specialized for photosynthesis.