Abu Abdallah Muhammad ibn Fatak, better known as al-Ma'mun al-Bata'ihi (), was a senior official of the Fatimid Caliphate in the early 12th century, during the reign of al-Amir.

His origin is obscure, but his father had held high military office, and thus al-Bata'ihi belonged to the Fatimid Egyptian elite. In 1107, at the age of about 21, he was chosen as chief of staff of the vizier al-Afdal Shahanshah, the de facto ruler of the state. In this capacity al-Bata'ihi carried out tax reforms which raised revenue and ensured the payment of the military. Al-Afdal was assassinated in 1121, officially by agents of the rival Nizari branch of Isma'ilism, which opposed the official Fatimid Musta'li Isma'ilism and did not recognize al-Amir as caliph and imam. However, both Caliph al-Amir and al-Bata'ihi are suspected to have been involved in the murder by some sources. Al-Amir appointed al-Bata'ihi to the vacant vizierate, establishing a partnership between caliph and vizier that brought the former once again into the public view, while retaining for the latter the de facto governance of the state.

As vizier, al-Bata'ihi was noted for his ability, justice, and generosity. He celebrated lavish festivals, where al-Amir had the opportunity to play a central role, and commissioned several buildings, of which the most important and only surviving one is the Aqmar Mosque in Cairo. Al-Bata'ihi also hunted down Nizari agents and sympathizers; the , issued in 1122, rebuffed Nizari claims and affirmed the legitimacy of Musta'li Isma'ilism. During his tenure, the Fatimids became more directly involved in Yemen, often ignoring their Sulayhid ally, Queen Arwa. In the Levant, attempts to take the offensive against the Crusaders failed, with a naval defeat at the hands of the Venetian Crusade in 1123 followed by the loss of Tyre in 1124. These failures, coupled with the caliph's resentment at al-Bata'ihi's power, led to his dismissal and imprisonment by al-Amir in 1125. He was then kept imprisoned until July 1128, when al-Amir ordered his execution. His son, Musa, wrote a biography that survives in fragments and is a key source for al-Bata'ihi's career.

Biography Al-Ma'mun al-Bata'ihi was born in AH 478 (1085/6 CE) or AH 479 (1086/7 CE), but is first mentioned in 1107, when he was appointed to succeed Taj al-Ma'ali Mukhtar as the chief of staff of the vizier al-Afdal Shahanshah. His origin is uncertain. A biography (Sirat al-Ma'mun) written by one of his sons, Musa, survives only in fragments quoted in other works, which do not cover the family's origin, but which ensure that al-Bata'ihi's political career is unusually well documented. Medieval sources affirm that al-Bata'ihi's father, Abu Shuja Fatak, enjoyed high honours from al-Afdal: he received the title of Nur al-Dawla () and when he died in 1118, the funeral prayer was read by Caliph al-Amir. Fatak was likely a high-ranking military commander. The (epithet indicating a person's affiliation) of may indicate an ultimate origin of the family in the Batihah marshlands in Iraq, but a rags-to-riches story circulated about al-Bata'ihi being son of a Fatimid agent in Iraq who came to Cairo after being orphaned and worked himself upwards is nothing more than a pious legend. Al-Bata'ihi had two brothers, Haydara and Ja'far, who became his deputies and chief aides, and four sons.

Service under al-Afdal At the time, the Fatimid Caliphate was de facto ruled not by the underage caliph al-Amir, but by al-Afdal, with the titles of vizier, commander-in-chief, chief , and chief , a sultan-like position he had inherited from his father, Badr al-Jamali (). Furthermore, al-Amir was himself a nephew of al-Afdal via his mother, and was in due course wed to one of al-Afdal's daughters. To assist him in government, al-Afdal initially relied on one of his s (military slaves), Mukhtar Taj al-Ma'ali, and his brothers, but in 1107 their increasingly high-handed and rapacious behaviour brought about their downfall and imprisonment. Al-Bata'ihi succeeded Mukhtar in his post, and received the military title of ('the Commander').

Administrative reforms

Increasingly ill and indisposed, al-Afdal came to rely greatly on al-Bata'ihi, who immediately launched a series of reforms. Indeed, the speed with which these were carried out could indicate, according to historian Michael Brett, that he had prepared and proposed them in advance to al-Afdal, which is why he was then chosen for his high post. The first reform arose from the discrepancy between the lunar Hijri year, which was used for tax purposes, and the solar year, which determined the actual harvest time and was longer by eleven days. The discrepancy meant that every 33 years, an entire nominal year's harvest was missing as the lunar year was ahead of the solar one. In August/September 1107 al-Bata'ihi ordered a ('conversion'), which brought the accounting year AH 499 (1105/6 CE) in line with the actual year AH 501 (1107/8 CE)—the multi-year gap indicating that this necessary adjustment had been neglected for considerable time in the past.

At the same time, al-Bata'ihi ordered a new cadastral survey (), which likewise was supposed to take place every thirty years, in order to bring the assessed land tax () in line with the actual agricultural capacity of the estates. This was a problem particularly affecting the army, since its pay was in the form of land grants (), to the proceeds of which the soldiers held rights in exchange for acting as tax farmers for the government. As land value changed over time, many of the lower-ranking soldiers, with lower-value grants, had seen their income reduced over time, while the senior commanders' higher-value estates were usually generating much more income than they were sending as taxes to the fisc, attracting more cultivators as well as benefiting from improvements and investments by their wealthier holders. Al-Bata'ihi's reform annulled all previous land grants, got the lower-ranking soldiers to bid high sums for the lands previously held by the senior-ranking ones, and even convinced the latter to bid for the lower-value grants by allowing them to pay only according to their own valuation, thus far below the original assessment. Al-Bata'ihi's son, writing about it a few decades later, maintains that it was a resounding success that was concluded to general satisfaction, and increased state income by 50,000 gold dinars.

New Nile canal and observatory Related to his reform of the tax system were two major infrastructure projects undertaken by al-Bata'ihi: a new canal in the eastern Nile Delta and a new observatory near Cairo. Following complaints by the local tax-farmer, Ibn al-Munajja, that the province of Sharqiyya was suffering from lack of water, which reduced its tax yields, a new canal was constructed in 1113–1115, after al-Afdal and al-Bata'ihi inspected the area in person. The enterprise proved very costly, which resulted in al-Afdal ordering the imprisonment of Ibn al-Munajja, but the canal's opening was celebrated with much pomp, with Caliph al-Amir taking part in the ceremonies in person.

The observatory project was related to the precise calculation of the calendar; two different astronomical tables () were in use in Egypt at the time, one calculated in the 9th century by al-Khwarizmi and the other in the early 11th century by Ibn Yunus, on behalf of the Fatimid caliph al-Hakim (). The two were not in agreement, and furthermore both had drifted from actual observations. The construction of an observatory south of Cairo had already begun in 1012, but abandoned thereafter. Work began in 1119 on a hill south of the cemetery of al-Qarafa, where the small Mosque of the Elephant was located. The affair turned into a fiasco: costs skyrocketed, especially for the large, and difficult to cast, bronze rings used for observations. Even when the latter were successfully cast and installed, it turned out that the Muqattam Hills actually blocked the view of the sun during sunrise; the whole apparatus had to be transported to a new site on the Muqattam itself. Several scholars were involved with the project, including the Andalusi Abu Ja'far ibn Hasday, the and geometer Ibn Abi'l-Ish of Tripoli, the instrument-maker Abu'l-Naja ibn Sind of Alexandria, and the geometer Abu Muhammad Abd al-Karim of Sicily. Construction was interrupted by al-Afdal's death in 1121, and when al-Bata'ihi, upon being appointed to the vizierate, ordered it resumed, the apparatus was laboriously moved to the Bab al-Nasr gate. This too would remain unfinished: after al-Bata'ihi's downfall in 1125, Caliph al-Amir ordered the materials dismantled and the workers and scholars dispersed.

Vizierate Rise to power

Al-Afdal was murdered by unknown assailants on 11 December 1121, on the eve of the Eid al-Fitr. The deed was officially blamed on agents of the rival Nizari Isma'ili branch and its Order of Assassins, but both medieval historians and modern scholars are skeptical: given his own resentment at the subordinate figurehead role to which al-Afdal had relegated him, al-Amir is suspected of having been the true instigator of the assassination. The sources that blame al-Amir for al-Afdal's murder also implicate the ambitious al-Bata'ihi in the deed, or at least in concealing al-Afdal's death until al-Amir could arrive at the vizieral palace to designate al-Bata'ihi as al-Afdal's successor.

After supervising the transfer of al-Afdal's enormous treasures to the caliphal palace, al-Bata'ihi was formally proclaimed vizier on 13 February 1122, and given the honorific al-Ma'mun ('the trusted one'), by which he is known. He received the titles of ('most illustrious lord'), ('Crown of the Caliphate'), ('Glory of Islam'), ('Glory of Mankind'), and ('Order of the Faith'). Al-Bata'ihi's appointment was necessary to ensure continuity in government, as al-Amir had been excluded from its affairs and was unfamiliar with its intricacies. Al-Bata'ihi formally assumed the same plenipotentiary powers that al-Afdal had possessed, and even a unique honour that had been denied to his two predecessors: state officials appointed by him took the al-Ma'muni, instead of al-Amiri after the reigning caliph. The caliph, a poor preacher, also delegated the duty of holding the Friday sermon to his vizier.

Nevertheless, al-Bata'ihi's position was much weaker vis-à-vis the caliph than his old master's. Under al-Afdal, al-Amir and his father, al-Musta'li (), before him had been confined in the caliphal palaces, while al-Afdal arrogated most public caliphal functions to himself. After al-Afdal's death, al-Amir now enjoyed a far more prominent public role, and he henceforth had a voice in government. Most importantly, al-Amir ensured that all tax income and precious textiles would be kept in the caliphal palace, and distributed from there. As the historian Michael Brett writes, "The relationship itself was one of alliance, in which the minister was entrusted as before with the responsibilities of government, in return for bringing the monarch out from his seclusion into the public eye". The changed balance of power was apparent to al-Bata'ihi, who sought to safeguard his position. According to his son Musa, the vizier had al-Amir sign a document pledging to communicate any denunciations or accusations directly to him. The document was to be valid until al-Bata'ihi's death, and the caliph furthermore undertook to look after the vizier's offspring after that.

Domestic policies