Abū Ja'far Abdallah ibn Aḥmad al-Qādir (), better known by his regnal name al-Qā'im bi-amri 'llāh () or simply as al-Qā'im; 8 November 1001 – 3 April 1075), was the Abbasid caliph in Baghdad from 1031 to 1075. He was the son of the previous caliph, al-Qadir. Al-Qa'im's reign coincided with the end of the Buyid dynasty's dominance of the caliphate and the rise of the Seljuk dynasty.
Early life
Al-Qa'im was born on 8 November 1001. He was the son of Abbasid caliph al-Qadir (r. 991–1031) and his concubine named Qatr al-Nada (died 1060), an Armenian or Greek, also known as Alam.
His father, Al-Qadir had publicly proclaimed his just nine-year-old son Muhammad (elder brother of Al-Qa'im) as heir apparent, with the title of al-Ghalib Bi'llah, in 1001. However, Muhammad died before his father and never ascended to the throne.
In 1030, al-Qadir named his son Abu Ja'far, the future Al-Qa'im, as his heir, a decision taken completely independently of the Buyid emirs. Al-Qadir died after an illness on 29 November 1031. Initially he was buried in the caliphal palace, but in the next year he was ceremonially moved to al-Rusafa. Al-Qa'im, meanwhile, received "the usual oath of allegiance" on 12 December 1031. to Al-Qa'im in 1056.
The Seljuk ruler Tughril overran Syria and Armenia. He then cast an eye upon Baghdad. It was at a moment when the city was in the last agony of violence and fanaticism. Toghrül, under cover of intended pilgrimage to Mecca, entered Iraq with a heavy force, and assuring the Caliph of pacific views and subservience to his authority, begged permission to visit the capital. The Turks and Buwayhids were unfavorable, but Tughril was acknowledged as Sultan by the Caliph in the public prayers. A few days after, Tughril himself — having sworn to be true not only to the Caliph, but also to the Buwayhid amir, al-Malik al-Rahim, made his entry into the capital, where he was well received both by chiefs and people.
The Turkic general Arslan al-Basasiri revolted in 1058 and successfully took Baghdad while Tughril was occupied with his brother's revolt in Iran. was appointed as vizier by al-Qa'im in 1062. Fakhr ad-Dawla arrived and was "showered with gifts, robes of honor, and the title Fakhr ad-Dawla ('glory of the dynasty')." Fakhr ad-Dawla was "despondent and apologetic" and "acquiesced in tears".
Meanwhile, Nur ad-Dawla Dubays had been making "entreaties to the caliph" on Fakhr ad-Dawla's behalf. This document of retraction is the only one of its kind to survive in full from the middle ages to the present day; the episode marked the ascendancy of traditionalism in Baghdad in the 11th century.
Family
One of Al-Qa'im's wives was the sister of Abu Nasr bin Buwayh also known as Malik Rahim. She died in 1049–50. Another wife was Chaghri Beg's daughter Khadija Arslan Khatun. She had been betrothed to his only son Dhakhirat al-Mulk Abu'al-Abbas Muhammad. However, Muhammad died, and Khadija Arslan married Al-Qa'im in 1056. After Al-Qa'im's death in 1075, she married Ali ibn Faramurz. One of Al-Qa'im's concubines was Al-Jiha al-
Qa'mya, an Armenian.
His son Muhammad had a son, Al-Muqtadi, who succeeded his grandfather, born to an Armenian concubine named Urjuwan also known as Qurrut al-Ayn. In 1061, Seljuk Sultan Tughril I sent the qadi of Ray to Baghdad, to ask her hand in marriage to him. The marriage contract was concluded in August–September 1062 outside Tabriz, with a marriage proportion of one hundred thousand dinars. She was brought to the Sultan's palace in March–April 1063. After Tughril's death, his successor Sultan Alp Arslan sent her back to Baghdad in 1064. In 1094, Caliph Al-Mustazhir compelled her to remain in her house lest she should intrigue for his overthrow. She died on 20 October 1102.
Death
When al-Qa'im was on his deathbed in 1075, Fakhr ad-Dawla took charge of his personal care - al-Qa'im did not want bloodletting but Fakhr ad-Dawla had it done anyway.
