Tunisian–Algerian War (1628)

The Tunisian–Algerian War of 1628 was a conflict between the regencies of Algiers and Tunis arising from territorial disputes. The casus belli involved the construction, by the Tunisians, of a military post along the river intended to demarcate the territory between the two regencies.

Background
In 1614, an initial treaty was signed to establish the boundary between the two regencies, specifically along a river known as Oued El Serrat. Fifteen years later, the arrangement was challenged due to encroachments by neighboring tribes (Ben Chennouf) and the establishment of a military post on the river serving as the demarcation line. Hussein Bey, the Pasha of Algiers, instructed Taïb Ben Chenouf from Kef to refrain from crossing the boundaries set in 1614. However, Youssef Dey ordered that this injunction be disregarded.

The Ottomans send a mediator to de-escalate tensions between the two regencies, but the efforts are ignored. War is then declared, and several encounters occur between the armies of the two states. The Tunisian army is defeated on May 17, 1628. The concluded peace treaty is entirely dedicated to delineating the border.

Battle
The Algerians, numbering 300 tents with nine cannons and supported by numerous Arab contingents, advance towards El Kef. Youssef Dey marches against them with 480 tents and 55 cannons, backed by the Drids, the Ouled Saïd, and other Tunisian tribes. Taïb Ben Chenouf manages to lure the Algerians into a challenging valley, where they suffer significant losses. However, due to his connections with the Harar (a faction of the Ouled Ben Chenouf), he switches sides to the Algerian camp, leading to the rout of the Tunisian army.

Aftermath
Dey Youssef accepts the peace proposals conveyed by his officers and ratifies the treaty concluded with the Algerians for the delineation of the border.

The fourth clause of the treaty specifies that subjects of either regency who cross the border cannot be claimed by the government from which they departed. They consequently become subjects of the regency to which they have emigrated. The peace treaty dictates that Tunis must pay tribute and compensation to Algiers.
 * The military post erected by the Tunisians along the river must be dismantled.
 * The border continues to be defined by the Oued Mellègue.
 * A line connecting specific points is established: Djebel El Hairech, Quloub Thirân, and the summit of Djebel Hafa extending to the Mediterranean Sea.