# Tunisian–Algerian War (1705)

The Tunisian–Algerian War of 1705 was a conflict between the Regency of Algiers and the Regency of Tunis.

## Background

During the Maghrebi war, The Regency suffered from brutal campaigns from both the West and East by the Moroccan and Tunisian alliance. The Dey of Algiers Hadj Hassen-Chaouch who was in charge during the rest of the war, was mainly helped by his Agha Hadj Mustapha(fr), an important figure in the Maghrebi War. His first battles took place in the Western Beylik during the Mascara Campaign from the Moroccan army of Moulay Ismail who had started pillaging all of the western cities of the beylik of oran. In 1701, Hadj Mustapha helped his vassal Ali Khodja Bey in Constantine, who then died trying to defend Constantine from the army of Ibrahim el Sharif. Mustapha would then meet the Tunisians near Setif and win the Battle of Jouami' al-Ulama with few casualties. The war ended with the assassination of Murad III and his entire family by Ibrahim el Sharif, who had more specific plans after his return from Istanbul.

## The war

After the Maghrebi war, the Dey Hadj Chaouch resigned from being Dey and appointed Hadj Moustapha for his numerous victories during the war. The regency, however, suffered from a lack of money due to the war. Consequently, The Dey would unnecessarily raise taxes trying to raise some money for the already crumbling state, But even with all that, The only beneficial way to gain money, Was to turn towards the neighboring state of Tunis.

### Battle of Kef

The Algerian army entered the Tunisian territory on 8 July and set their camps close to Kef in Oued el-Tin (probably Oued-Mellègue). Unfortunately for the Tunisians, when the Algerians set their camps, one of the Banu Hilal Arab tribes of Tunisia named Ouled Saïd [fr] decided to switch sides and ally with the Algerians. This event would eventually lead to other various other Arab tribes to follow the Ouled Saîd, and eventually the powerful Drid [fr] who had already betrayed Tunisia several times before. A part of Ibrahim's regular troops also changed sides. Dey Mustapha then proceeded to send officers to Ibrahim to ask peace terms, such as: demanding Tunisia pay a tribute for war reparations, send a delivery of 1000 camels, and hand over one of his children to the Dey to serve as a hostage.
Ibrahim took this as a provocation and entered Kef soon after with his Agha Al-Husayn I ibn Ali. Even though Ibrahim had the advantage in the battlefield, the Algerians would somehow take the advantage and surround the city, leaving the Tunisians trapped and worried to be attacked from all sides. After a long fight, Ibrahim would eventually surrender with the small number of soldiers he had. Getting imprisoned and sent to Algiers. After this, the rest of the Tunisian troops retreated to Tunis in the head of their Agha. The most influential one of them, Al-Husayn I ibn Ali, proclaimed himself Dey and founded the Husainid dynasty on 10 July 1705, putting an end to the Muradid War of Succession.

### Siege of Tunis

The Algerian army eventually arrived in front of Tunis and took position in Ben-Medjous with an army of 40,000 soldiers, counting also among them 10,000 rebels and put the city under siege. The Tunisians who were 18,000 individuals, fearing the pillage of their city, resisted and protested against the Dey Moustapha, causing Husayn to pay him a ransom of 150,000 Piastres to lift the siege. The Dey then noted that food and ammunition were becoming increasingly short and that winter was approaching, leaving Mustapha no choice but to abandon the siege and go back to Algiers.

### Battle of Majaz al-Bab

After the Algerians left Tunis in the night of 7 or 9 October, the Bey Husayn decided to send a small cavalry to chase the Dey's army, after they took the treasures and military equipment they had, among them, some Arabs that deserted the Algerian army during the siege of Tunis, after there was nothing else to pillage. The small cavalry followed the Algerian all the way to a small plain near the city of Majaz al Bab named Sedira, after Moustapha found out that a cavalry was following them, he turned around for an offensive return, this caught the Tunisians off guard and made a mess between them, resulting in 500 losses from the Tunisians.

## Aftermath

Mustapha left Tunis on October 6, 1705, and was harassed by Kabyles and Tunisians on his way to Algiers. After finally returning to Algiers, he received his payment from Husayn.
After the assassination of the Hadj Mustapha, Several Pretenders fought for the title of Dey and Algiers fell into chaos with the assassinations of the succeeding deys, two people started fighting for the title of Dey. The first one was a representative of the Ottoman Sultan Ahmed III and the other one was described as the chosen one of the Algerians. Finally, after five years of political and economic instability, Baba Ali Chaouch became Dey and restored stability to the republic.