Complex sentence: Knights and soldiers were billeted here on the rocky outcrop, while artisans and traders settled in the area beneath it, creating the long-standing social distinction between the upper and the lower city.
Split into simpler sentences: Knights and soldiers were billeted here on the rocky outcrop, while artisans and traders settled in the area beneath it. Thus was created the distinction between the upper and the lower city.