Original: It was ruled by the Abbasid dynasty of caliphs, who built their capital in Baghdad after overthrowing the Umayyad caliphs from all but Al Andalus.
Simplified: It overthrew the Umayyad caliphs from all but Al-Andalus.