The theory of endosymbiosis states that chloroplasts and mitochondria were indepedent bacteria, previously. They were purple non sulfur bacteria, and were engulfed by other prokaryotic species, and thus became a part of their internal oraganelle. It was postulated by Linn Margulis