In the 10th century it suffered severely, being repeatedly pillaged in the wars of the Fatimite caliphs Al-Qaim and Abu Tahir Ismail el Mansur with the Sunnite leader Abu Yazid and the Zenata Berbers.
At this time the power of Qaim, the Abbasid caliph of Bagdad (see Caliphate, section C, § 26), was reduced to a mere shadow, as the Shiite dynasty of the Buyids and afterwards his more formidable Fatimite rivals had left him almost wholly destitute of authority.
- He was succeeded by his son, who at his accession took the title of al-Qaim bi-amri'llah (" he who maintains the cause of God").
Qaim died two years later, Shaaban A.H.
In the first year of the Caliphate of al-Moqtadi bi amri'llah (" he who follows the orders of God"), a grandson of Qaim, the power of the Seljuk empire reached its zenith.