Complex sentence: It was conquered by invading Islamic armies in the eighth century, and then became the capital of the Islamic Emirate and then Caliphate of Córdoba, including most of the Iberian Peninsula.
Split into simpler sentences: It was conquered by invading Islamic armies in the eighth century. It then became the capital of the Islamic Emirate and then Caliphate of Córdoba, including most of the Iberian Peninsula.