Ahmad ibn Buya (Persian: احمد بن بویه, died April 8, 967), after 945 better known by his laqab of Mu'izz al-Dawla (, "Fortifier of the Dynasty"), was the first of the Buyid emirs of Iraq, ruling from 945 until his death.

The son of a Daylamite fisherman who had converted to Islam, Ahmad ibn Buya was born in the mountainous region of Daylam, and by 928, he along with his two brothers served the Daylamite military leader Makan ibn Kaki. However, they quickly changed their allegiance to the Ziyarid ruler Mardavij; some years later they rebelled against him after finding out that he planned to murder one of them. In 935/6, Ahmad ibn Buya unsuccessfully invaded Kerman, and was later sent to Istakhr. From there he started making incursions into Khuzestan and later Iraq; by 945, he was officially recognized as the ruler of Iraq and Khuzestan and had received the title of "Mu'izz al-Dawla" from the Caliph, while his two brothers were the rulers of other territories, having also received titles from the Caliph.

Throughout his rule, Mu'izz al-Dawla was devoted to conflicts with other dynasties for control over Iraq—in 946, an important battle took place in Baghdad between Mu'izz al-Dawla and the Hamdanid amir Nasir al-Dawla, which lasted several months, with Mu'izz al-Dawla emerging victorious. Mu'izz al-Dawla also fought against the Batihah amirate several times, but was unable to decisively defeat it. Mu'izz al-Dawla also had problems with some of his Daylamite kinsmen, who would sometimes rebel against him, the most dangerous instance being the rebellion of Ruzbahan from 955 to 957. By Mu'izz al-Dawla's death in 967, he had defeated all his foes and was the unchallenged ruler of Iraq. He was succeeded by his son Izz al-Dawla.

Family and early career Ahmad was the son of Buya, a Daylamite fisherman from Lahijan,Wolfgang Felix & Wilferd Madelung, pp. 342–347 who had left his Zoroastrian faith and converted to Islam.Iran Under The Buyids, Heribert Busse, The Cambridge History of Iran, 274. Ahmad had two older brothers named 'Ali and Hasan, and a sister named Kama.Kennedy (2004), p. 244

Around 928, Ahmad's brother Ali joined the service of Makan ibn Kaki, who was the Samanid governor of Ray. 'Ali then managed to gain military positions for Ahmad and their other brother, Hasan. At the time, Ahmad was about thirteen years old. When Makan attacked his Samanid overlords and was subsequently defeated by the Ziyarid prince Mardavij, the brothers transferred their allegiance to the latter. In the following years, 'Ali repudiated his subservience to Mardavij and, after some time, managed to create an empire in Fars, where Ahmad distinguished himself in battle.

In 935 or 936, 'Ali sent Ahmad to Kerman with the task of conquering that province from the Banu Ilyas. Ahmad overran much of Kerman, but encountered resistance from the Baluchis and Arab Qafs,Iran Under The Buyids, Heribert Busse, The Cambridge History of Iran, 257. receiving a wound to the head and losing a hand and several fingers on the other. Direct Buyid control over Kerman was not established, resulting in 'Ali's recall of Ahmad. The latter was then sent to Istakhr to await further orders.

Ahmad's next opportunity to expand the possessions of the Buyids came when the Baridis requested help from 'Ali. The Baridis, who ruled in Khuzestan, were nominally subordinate to the Abbasid Caliphate, but were attempting to establish their independence. Ahmad was sent by 'Ali to the area; he succeeded in uprooting the authority of the Baridis and taking control of that province.

Invasion and conquest of Iraq

From Khuzestan he launched several campaigns into Iraq, where the Caliphate was in serious internal disarray. These expeditions were on his own initiative; Ali had not ordered them and did not send support for them. In 944, Ahmad captured Wasit, but was met by an Abbasid army near Al-Mada'in under the de facto ruler of the Caliphate, Tuzun. Ahmad eventually emerged victorious during the battle, and then marched towards Baghdad, but was forced to retreat back to Ahvaz on July 28 after Tuzun destroyed the bridge to Baghdad.Miskwaihi, p. 80 In 945, an Abbasid officer, Yanal Kushah, joined Ahmad, who shortly invaded Iraq again.Miskwaihi, p. 87

Ahmad then gained control of Baghdad on December 19, 945 without a struggle. He took charge of the administration of the Caliphate by taking the position of amir al-umara'''. The Caliph Al-Mustakfi also gave him the honorific title of "Mu'izz al-Dawla" ("Glorifier of the State"). 'Ali was given the title of "'Imad al-Dawla" ("Support of the State"); another of Ahmad's brothers, Hasan, who had gained control of northern Persia, gained the title of "Rukn al-Dawla" ("Pillar of the State"). Mu'izz had brought many of his Daylamite soldiers to Iraq, whom he settled there. He also brought many prominent Persian statesmen, including Abu'l-Fadl al-Abbas ibn Fasanjas from the Fasanjas family, who served as the financial minister of Basra.Kennedy (2004), p. 220

Despite the fact that Mu'izz al-Dawla had taken control of Iraq by himself, he remained subordinate to 'Imad al-Dawla, who ruled in Shiraz. Coins bearing 'Imad al-Dawla's name in addition to his own were made. His title of amir al-umara', which in theory made him the senior amir of the Buyids, meant little in reality and was soon claimed by 'Imad al-Dawla. Although he maintained a certain level of independence, he was largely subordinate to 'Imad al-Dawla.

First war with the Hamdanids

Background News of this event was received negatively by the Hamdanid amir Nasir al-Dawla, who ruled over Mosul and the districts of the eastern Jazira. Nasir al-Dawla had previously controlled Baghdad in 942 and he still entertained hopes of regaining the city.Kabir, p. 7

Nasir al-Dawla had reason to be confident that he could defeat Mu'izz al-Dawla if he made an attempt to capture Baghdad. His army had been bolstered by the arrival of numerous Turkish soldiers who had fled from Baghdad just before Mu'izz al-Dawla's entrance into the capital,Miskawaihi, p. 88 and he was much more familiar with the territory between Mosul and Baghdad than his rival was. Mu'izz al-Dawla, on the other hand, was on less secure ground; Baghdad was in a sorry state thanks to years of mismanagement and he was hamstrung by its numerous financial and military problems.Donahue, p. 34 Nasir al-Dawla furthermore gained a pretext for war when in January 946 Mu'izz al-Dawla deposed and blinded the caliph al-Mustakfi and replaced him with the more obedient al-Muti'.Canard, "Histoire," p. 513; Miskawaihi, pp. 89-90 As a result, Nasir al-Dawla took a belligerent tone with the Buyids: he withheld the payment of tribute to Baghdad,Miskawaihi, p. 86, notes that Nasir al-Dawla had effectively stopped paying the required tribute even before the Buyid takeover of Baghdad refused to recognize al-Muti' as caliph and continued to mint coins in al-Mustakfi's name.Bacharach, p. 58

Initial hostilities It quickly became clear that the two amirs would be unable to work out an agreement with each other. In February 946, Mu'izz al-Dawla sent an army under the command of Musa Fayadhah and Yanal Kushah to Ukbara, in preparation for a campaign to conquer Mosul. The expedition was terminated, however, when Yanal Kushah suddenly attacked Musa and deserted to the Hamdanids. Nasir al-Dawla responded to this act of aggression by leading his army, which included a number of Turks, to Samarra the following month. Mu'izz al-Dawla similarly gathered his forces and departed from Baghdad with the caliph al-Muti' for Ukbara.Miskawaihi, pp. 92-3; Canard, "Histoire," p. 513

While stationed at Samarra, Nasir al-Dawla sent his brother Jubayr to sneak around the Buyid army and head south to Baghdad. When Jubayr arrived at the city, he was welcomed by the citizens and by Mu'izz al-Dawla's former secretary Muhammad ibn Shirzad, who declared his allegiance to the Hamdanids and administered the affairs of Baghdad on their behalf. Nasir al-Dawla then decided to head for Baghdad himself. Leaving his cousin al-Husayn ibn Sa'id in the field to distract Mu'izz al-Dawla, he headed south and reached western Baghdad on April 15, and though he was forced to destroy his baggage when a number of Daylamites threatened to seize it, he and his forces were able to gain control of the city.Miskawaihi, p. 93; Canard, "Histoire," pp. 513-4

When Mu'izz al-Dawla learned that he had lost Baghdad, he gathered his Daylamite soldiers, who had been busy plundering Tikrit and Samarra, and headed back to the city. When he arrived, he found that Nasir al-Dawla had crossed the Tigris and set up camp outside the Shammasiyyah quarter of eastern Baghdad; he therefore dug in on the western side of the city, and the two sides prepared for fighting.Miskawaihi, p. 93; Canard, "Histoire," p. 514

Stalemate For the next three months, control of Baghdad was divided between the Hamdanids and Buyids, with the Tigris dividing the two. On the Hamdanid side, Nasir al-Dawla promoted Ibn Shirzad to serve as one of his chief commanders, while on the western side, Abu Ja'far Saymari, the chief secretary of Mu'izz al-Dawla, managed the Buyid war effort.Miskawaihi, pp. 93-4

Both sides were clearly determined to take permanent control of the city, and the battle quickly turned into a stalemate. Combat took place in multiple locations throughout Baghdad, with both the Hamdanid and Buyid forces launching offensive sorties against each other. Neither side, however was able to generate a victory large enough to win control of both halves of the city. Getting troops across the Tigris successfully was a challenge, and even if an army managed to make it to the opposite shore, they were usually forced to retreat in short order.Miskwaihi, pp. 93-5

Control of the Tigris was a major objective for both sides. The Hamdanid and Buyid armies both built zabzabs or small riverboats and used these to launch attacks on each other. Each day, Ibn Shirzad led a number of zabzabs filled with Turks up and down the Tigris, and they shot arrows at the Daylamites stationed on the western side of the city. Mu'izz al-Dawla also constructed a fleet of zabzabs, and his troops used these to battle the Hamdanid forces patrolling the river.Miskawaihi, pp. 93, 95; Canard, "Histoire," p. 514

On the eastern side, Nasir al-Dawla attempted to legitimize his seizure of the city by re-issuing the coinage of 942–943, from when he had last been in control of Baghdad. At least part of the population accepted his claims and supported him throughout the fighting. Ibn Shirzad was also able to augment the ranks of the Hamdanid forces by enlisting local citizens and criminals, and they participated in attacks on Mu'izz al-Dawla's Daylamite troops.Miskawaihi, p. 95; Canard, "Histoire," pp. 514-5

The economy of Baghdad suffered greatly throughout the fighting. Both sides seized the produce of local cultivators to feed their troops. Eastern Baghdad was able to avoid any serious shortages thanks to shipments flowing down from Mosul, but the western side was subjected to a blockade for the duration of the conflict. Nasir al-Dawla's forces prevented civilians on the western side from crossing to the eastern, while a number of allied Arab tribes surrounded western Baghdad and cut off the flow of supplies. The blockade was effective and soon shortages were rampant on the Buyid side; the price of bread soared to more than six times what it was selling for on the eastern side of the river, and was sometimes not available at all.Miskawaihi, pp. 94-5; Canard, "Histoire," p. 514; Donahue, p. 34 Starving people were reduced to eating grass and carrion, and several women were executed for acts of cannibalism.Miskawaihi, p. 99

Buyid victory