Abū Yazīd Makhlad ibn Kaydād (; – 19 August 947), was a member of the Ibadi sect. He opposed the Ismaili Shia rule of the Fatimids in North Africa and sought to restore Ibadi dominance in the region. Known as the Man on the Donkey () due to his humble means of transport, Abu Yazid led a rebellion against the Fatimid Caliphate in Ifriqiya (modern Tunisia and eastern Algeria) starting in 944, rallying various Berber tribes and disaffected groups against the Fatimids. His forces initially achieved significant victories, even threatening the Fatimid capital of al-Mahdiyya. Abu Yazid conquered Kairouan for a time, but was eventually driven back and defeated by the Fatimid caliph al-Mansur bi-Nasr Allah in 947, Abu Yazid escaped following a siege, but was wounded and captured. He died of his wounds several days later.

Early life Abu Yazid's father Kaydad was a Zenata Berber from Taqyus or Tozeur in the district of Chott el Djerid, then still known by its ancient name, Qastiliya. Kaydad was a trans-Saharan trader, and during his travels took as concubine a Hawwara or Black African slave, Sabika. Abu Yazid was born south of the Sahara, at Tadmakka or Gao. Coupled with his mother's descent, this brought him the sobriquet "the Black Ethiop" ().

Abu Yazid returned with his father to Qitun near Tozeur, where Kaydad died shortly after. The orphaned boy survived through alms, and in his youth became a schoolmaster in the area of Qitun, Tozeur, and Taqyus. Likely raised as a Kharijite from infancy, Abu Yazid went to Tahert to study the Ibadi doctrine (); at the time, Tahert was still the seat of an Ibadi imam of the Rustamid dynasty, who was widely acknowledged by the North African Kharijites as their spiritual leader. Abu Yazid was an eyewitness to the end of the Ibadi imamate in 909: after the overthrow of the Aghlabid emirate by the Isma'ili preacher Abu Abdallah al-Shi'i and his Kutama followers, the latter marched west to Sijilmasa, to bring his hidden master, Abdallah al-Mahdi Billah, back to Ifriqiya to assume the throne of the Fatimid Caliphate. On the way, the Kutama overthrew and executed the Rustamid imam, and installed a Fatimid governor in his place. Abu Yazid returned to Takyus, and resumed his activity as a schoolmaster.

In 928, Abu Yazid began his anti-Fatimid agitation. He was arrested in 934 but escaped, and went on the Hajj to Mecca. In 937 he returned to Tozeur clandestinely and resumed his preaching. He was denounced and arrested once again, but sprung out of prison by his former teacher Abu Ammar Abd al-Hamid al-A'ma and forty of his armed followers, along with two of Abu Yazid's sons. Abu Yazid and his family fled to the Aurès Mountains in what is now eastern Algeria, finding refuge with the Hawwara tribe. The area had in the previous decades been converted to the Nukkari branch of Ibadi Islam, and was a major centre of the sect, with Abu Ammar as its local leader. The Nukkaris rejected the hereditary Rustamid imams and insisted upon the election of the community's leader.

Rebellion Abu Yazid, his wife and four sons, Abu Ammar, and twelve followers settled at the village of al-Nawalat, which became the centre of their movement. Abu Yazid toured the region and called the locals to join him in holy war against the Fatimids. The group soon succeeded in gaining a large following among the Hawwara, and Abu Yazid was elected as their leader (, ). Thereupon Abu Ammar relinquished his leadership to him as the more worthy one (), in accordance with the Nukkari doctrine. Abu Yazid deliberately avoided assuming the title of imam for the moment; an imam would be elected once the Fatimid capital, al-Mahdiya, was taken, but until then, an assembly would govern the movement.

Abu Yazid's movement was the spiritual heir to a number of tendencies endemic in the Maghreb: the Ibadi movement, with its anti-Arab and pro-Berber chauvinism and its insistence that leadership belonged to the "best Muslim", in marked contrast to the Fatimids' claims to a hereditary imamate; the anti-imperial traditions of the great Berber Revolt against the Umayyad Caliphate in 740; and the strong messianic traditions of the Maghreb, which had welcomed and sheltered the Alids persecuted by the Abbasid Caliphate, and which would recur throughout history, culminating in the messianic empire of the Almohads in the 12th–13th centuries.

Abu Yazid himself cut a messianic figure: his appearance fitted the signs of a prophet in Islamic messianic tradition, such as a mole on his shoulder; of advanced age, dressed in rags and lame, he rode a donkey, which gave him the nickname "Man on the Donkey" or "Lord of the Donkey" (). The "awaited prophet who would come riding on an ass" was a figure with a long tradition in Judaic, and later Islamic, eschatology, was associated with Jesus and Muhammad, and was emulated by several would-be prophets during the early Islamic centuries. Even his pejorative sobriquet was often held to have messianic connotations. On the other hand, Abu Yazid's Fatimid enemies cast him as the "False Messiah" ().

Invasion of Ifriqiya and the fall of Kairouan, February–October 944 In February 944, Abu Yazid's followers descended from the mountains to overthrow the Fatimids, attacking the forts in the environs of Baghaya. The uprising appears to have caught the Fatimids by surprise. The local governor tried to put pressure on the tribal chieftains to deliver Abu Yazid to him, but in vain. Caliph al-Qa'im mobilized his loyal Kutama tribes, but the small and highly mobile bands of Abu Yazid eluded them, and were always able to escape back to the safety of the Aurès.

The first major settlement to capitulate was Tébessa, followed by Marmajanna, where he was given his famous donkey to ride. After the surrender of Sbiba, the rebels destroyed a Kutama army near Dougga and captured the city. On 7 August 944, al-Aribus (ancient Laribus), the gate to the core of Fatimid Ifriqiya, surrendered in exchange for a letter of safety () for its inhabitants; Fatimid officials and all adherents of Isma'ilism were explicitly excluded from it. Al-Qa'im mobilized four armies in response: one to defend the old Aghlabid palace city of Raqqada, one under Khalil ibn Ishaq al-Tamimi to secure the former capital and major city of Ifriqiya, Kairouan, one under the eunuch Bushra to the area of Béja, and the main army under Maysur al-Fata, which was to encamp midway between al-Mahdiya and Kairouan, ready to assist either.

These dispositions left the initiative to the rebels, who attacked Bushra. In the subsequent battle, the Fatimids initially prevailed, until Abu Yazid, unarmed and in his usual ascetic habit, rallied his men and led them to victory. Béja was sacked for three days, while Bushra and his men withdrew, first to Tunis, and then, as its inhabitants wanted to surrender, over sea to Sousse. On 13 October, Abu Yazid's forces appeared before Raqqada, which they plundered. Ensconced in Kairouan, Khalil al-Tamimi resisted his officers' calls to march out and confront the rebel army, awaiting the arrival of the main Fatimid army under Maysur al-Fata, but the latter also hesitated to move decisively against the rebels.

As a result, the disgruntled and unpaid soldiers of the local militia began deserting to the rebels, until Khalil was left with only 400 men. Unable to man the city walls with this small a force, he withdrew to the governor's palace next to the Great Mosque of Kairouan. As Abu Yazid's troops entered Kairouan on 14 October, Khalil began to negotiate an with the rebels. Most of his men used a rope to escape from the back of the palace, but Khalil, the city's chief , the army treasurer and thirty others were taken prisoner and led to Abu Yazid in Raqqada. The rebel leader initially intended to spare Khalil's life, but Abu Ammar pointed out that dangerous foes should be killed. As a result, Abu Yazid had Khalil and the chief executed. Abu Yazid completed his triumph by destroying Maysur's army in a surprise night attack on 29/30 October: Maysur was killed, and his army disintegrated. Shortly after, Sousse was sacked as well.

The mostly Maliki Sunni inhabitants of Kairouan, who greatly resented Fatimid rule, were initially supportive of Abu Yazid's takeover, but the unruly behaviour of his Berber followers and their rapacious behaviour quickly alienated them. Abu Yazid himself was not immune to the accusations: after the conquest of Kairouan he began to abandon his Spartan habits for silk clothes, and his characteristic donkey for thoroughbred horses, which estranged his more austere followers. He even took two sisters as concubines, disregarding Sunni law, arguing that, as non-Kharijites, they were slaves and he could do as he pleased.

Failure at al-Mahdiya, January–September 945 Leaving Abu Ammar and his own son Fadl to govern Kairouan in his name, Abu Yazid moved to capture the final Fatimid stronghold, the palace city of al-Mahdiya. Abu Yazid arrived before the Fatimid capital on 9 January 945. The first attack on the city, on 20 January 945, reached the wall of the palace city, but was eventually pushed back. The city was placed under blockade, which lasted until 16 September 945.

The Fatimid position was difficult, as the ships bringing in grain supplies ran aground and were captured by the rebels, but Abu Yazid also faced problems. Most of his men were untrained peasants, who now returned to their fields, or out for plunder; the Kharijite leader could count firmly only on the Hawwara. As a result, the siege was not very effective, and Fatimid sallies sometimes found the enemy camp empty. In the meantime, Abu Yazid himself had to face a revolt by a man who pretended to be an Abbasid prince and the , the Islamic messiah; Abu Yazid's son Ayyub, governor of Béja, arrested and executed the man after an interrogation proved he was an impostor.

The siege of al-Mahdiya was broken as a result of the defection of the Arab troops from al-Aribus on 16 September: at the crucial point of a battle against a Fatimid sortie, the Arabs turned on their erstwhile allies. The rebel army suffered heavy losses, and Abu Yazid was forced to retreat to Kairouan.

Pro-Fatimid plots and uprisings, September–November 945 Admonished by Abu Ammar, he abandoned the luxuries he had adopted and returned to his previous austere life, leading to a resurgence in Berber support for his cause. However, the inhabitants of Kairouan had by now turned against him. Some contacted the Fatimids, offering to hand him over; an assassination plot was discovered and averted; and riots erupted over the issue of the abduction of the locals' daughters and concubines by the Kharijite soldiery. Abu Yazid was forced to promise to stop the practice, and departed Kairouan; thereupon the locals forcibly released many women who had been abducted.

Discontent with Abu Yazid's rule spread across other parts of Ifriqiya: Sousse rose in revolt and, assisted by a Fatimid fleet, overthrew Kharijite rule. Tunis, Béja and al-Aribus followed suit. During the following months, heavy fighting between Abu Yazid's and the Fatimid forces occurred at Tunis, which was captured and recaptured by both sides, and left almost completely destroyed. A similar fate befell Béja and al-Aribus.

Abu Yazid's son Ayyub defeated a Fatimid army from Msila. Its commander, the veteran Fatimid partisan Ali ibn Hamdun al-Andalusi, was mortally wounded and died shortly after. In November, Ayyub was defeated by Fatimid troops under al-Hasan ibn Ali al-Kalbi, before in turn defeating the latter. Al-Hasan ibn Ali withdrew to the territories of the Kutama Berbers in Lesser Kabylia, who were the mainstay of the Fatimid regime; from there he took over the fortresses of Tijis and Baghaya, threatening Abu Yazid's rear.