Battle of Jouami' al-Ulama

The Battle of Jouami' al-Ulama took place on 3 October 1700 near Sétif, Algeria. It was fought between the armies of the Bey of Tunis Murad III and those of the Deylik of Algiers commanded by the Dey Hadj Mustapha, and a newly elected Bey of Constantine, Ahmed ben Ferhat.

Background
In 1699 Tunisian troops reinforced with Tripolitanian ones invaded the Beylik of Constantine, at the same time as the Moroccan ones invaded western Algeria. The Bey of Constantine at the time, Ali Khodja Bey, was more prepared than his Mascaran counterpart, although he failed decisively in a battle near Constantine against Murad III Bey, and his commander Ibrahim Sharif. Although his goal was not necessarily clear, he most likely wanted to incorporate Kabylia and Constantinois into Tunisia in a similar fashion to the Hafsid Kingdom.

Battle
After Ali Khoudja's decisive defeat, the Dey of Algiers Hadj Mustapha decided to elect Ahmed ben Ferhat as the new Bey of Constantine.

The Tunisian army consisted of about 700 tents, while the Algerian army was barely 100. Thus, Murad was absolutely amused at the number of Algerian troops, and ordered his troops to rest. The Algerians themselves were uneasy, and thus Hadj Mustapha decided that the only way for them to succeed would be to ambush them. During the night while the Tunisians were asleep, the Algerian army mainly composed of light tribal cavalry moved in and attacked the Tunisians, and massacred about 7,000 of them. Murad and his commanders had to flee, while the Algerians moved into the ruins of their camps.

This defeat caused a rout, and Murad III had to retreat back to Tunisian territories, abandoning all of his gains. He attempted to raise another army to attack Algiers again. He also sent his commander Ibrahim Sharif to Constantinople to recruit additional janissaries.

Aftermath
In 1702, Murad III was raising an army for another offensive on Algiers. Ibrahim Shariff returned from Constantinople with a large number of Turkish janissaries which pleased Murad III. although unknown to him, Ibrahim Sharif, acting on secret orders from Ottoman Sultan Mustafa II, on 2 June he assassinated Murad III and killed his entire family, and restored Ottoman control over the territory, and ending the Muradid dynasty. He signed a peace treaty with the Algerians a few weeks later, ending the war with a status quo ante bellum.