Abu Abdallah Muhammad VI ibn al-Hasan

Abu Abdallah Muhammad VI ibn al-Hasan (أبو عبد الله محمد بن الحسن) sometimes referred to as “Moulay Muhammad”, was the last Hafsid ruler of Ifriqiya (1573–1574). His brother Moulay Ahmad had been driven out of power in 1569 by Uluç Ali and when the Spanish reconquered Tunis Ahmad was unwilling to accept their terms for supporting him, preferring instead to remain in exile in Sicily. Instead, the Spanish invasion force under Don John of Austria installed Moulay Muhammad in his place.

Installation
Abu Abdallah Muhammad was unable to prevent the Spaniards who had installed him from sacking the city. Some of the inhabitants took refuge in a mosque, but the soldiers went in and killed them. Don John also had the four marble columns in the Zeitouna mosque removed. These actions made Abu Abdallah Muhammad deeply unpopular. The 17th historian fr:Ibn Abi Dinar recounted the scene:

"The feet of the infidels trampled the schools, all the collections of science were scattered and dissipated in the streets, to such an extent that those passing to the east of the mosque could not pass without trampling them. And bells rang in the medina, and I heard some townspeople saying that the Christians were tying their horses in the Great Mosque."

Muslims were driven out of a Christian-occupied part of the city, and hundreds of refugees crowded the surrounding area. Justice was administered by a tribunal made up of the Christian governor and Abu Abdallah Muhammad.

The Turkish garrison fled Tunis and headed for Bizerte and Kairouan, meaning Abu Abdallah Muhammad was the nominal ruler of little more than Tunis and La Goulette.

Removal from power
Ten months after his installation of a powerful Ottoman attack was staged on Tunis, led by Sinan Pasha from Tripoli and by Uluç Ali from Algiers. On July 15, 1574 this force landed on the coasts of the Gulf of Tunis and quickly took possession of the Spanish fortress of La Goulette. After two months of skirmishes, the Turkish ships entered through the La Goulette canal and, on September 3, the Ottoman armies entered Tunis.

Moulay Muhammad was twice wounded by musket fire, captured and sent as a captive to Istanbul. There he was generously provided for and confined in Yedikule Fortress, where he died in 1594.

The end of the Hafsid dynasty
Moulay Muhammad was the last member of the Hafsid dynasty to rule Ifriqiya. His eldest son Muley Nazar had also lived in Sicily and died in battle in Tunis. Another of his sons, Muley Abderraman, was in Palermo in 1574 and wished to travel to the court in Madrid to swear fealty to Philip II in his father’s name, but the monarch ordered him to remain where he was. Muley Abderraman did not give up his claim to the throne: he tried to attract partisans in Tunis, taking advantage of a period of Ottoman weakness in the region. In 1594, claiming to be supported by several sheikhs and to have more than sixty thousand followers, he asked the Viceroy of Sicily to provide fifty or sixty galleys for an assault on Tunis but this was not granted to him.

In 1581 the Spanish made one final attempt to restore them. One of the Hafsid refugees in Sicily was Prince Ahmed (known as ‘Hamet’ in Spanish documents), brother of Moulay Hasan. He obtained Spanish support to sail from Palermo with a small band of followers. The Spanish brought him ashore somewhere remote in the Gulf of Gabès and sailed away. Hoping to unite the Bedouin tribes against Ottoman rule, he soon found himself abandoned and went into hiding in the interior. He was finally captured at El Djem in 1592 and sent captive to Constantinople. The remaining Hafsids in Spanish domains had converted to Christianity and abandoned any hope of returning to Tunis.