The empire reached its greatest extent under the Umayyads, from the Iberian peninsula after 711 to the Indus and the edge of Central Asia, and the failure of the sieges of Constantinople in the 670s and again in 717 and 718 fixed the frontier with Byzantium for centuries. Governing it exposed a contradiction the dynasty never resolved. Islam admitted converts on equal terms; the Umayyad fiscal system, built on Arab soldiers drawing stipends from the taxes of conquered non-Arabs, did not. Non-Arab converts, the mawali, found themselves still paying the taxes of subject peoples and excluded from the honours of the conquerors, and their grievance became the strongest current running against the dynasty.
Religious opposition took several forms at once. Kharijite revolts recurred across Iraq and Arabia on the principle that a sinful ruler forfeits authority; Shia risings appealed to the memory of Karbala; and pious scholars in Medina and Iraq, the ancestors of the ulama, criticised the caliphs as worldly kings rather than successors of the Prophet, a judgement that shaped how later Sunni historians wrote about them.
The revolution that began in Khurasan in 747 gathered all of it and destroyed the dynasty in 750. One grandson escaped to Spain, founded an emirate at Cordoba, and began the great mosque there in 785; his line took the caliphal title in 929 and lasted until 1031.