Mitochondria and chloroplasts likely evolved from engulfed prokaryotes that once lived as independent organisms. At some point, a eukaryotic cell engulfed an aerobic prokaryote, which then formed an endosymbiotic relationship with the host eukaryote, gradually developing into a mitochondrion.
hope this is what your looking for