What is the endosymbiotic hypothesis for the origin of mitochondria

What is the endosymbiotic hypothesis for the origin of mitochondria and chloroplasts? What evidence supports this hypothesis?