Ultimately the town of Djidjelli was taken easily, but after three months, heavily besieged and deprived of reinforcements by an outbreak of plague, the French abandoned the city and returned home.
The young king Louis XIV wanted to safeguard trade by the French merchant navy, which was continually being attacked by Barbary Coast pirates coming from the regencies of Algiers, Tunis and Tripoli, under Ottoman administration and protection.
They considered Bougie, Bône and Stora, near a French commercial outpost known as the Bastion de France, but eventually chose Djidjelli.
Even before the expedition embarked there was a disagreement between the Duke of Beaufort and the Count of Gadagne who wished to disembark at Bougie "then abandoned, better situated and more within reach of help than Djidjelli".
The Count of Vivonne met with stiffer resistance at Le Marabout, but the Kabyles soon abandoned their positions to retreat into the mountains and the expeditionary force set up camp for the night.
The French seized this opportunity to parley and establish friendly relations, but the Kabyles ambushed the expedition and caused serious casualties.
[10] However, after failing to retake Djidjelli themselves they eventually allowed the troops of the bey of Constantine and of the Regency of Algiers to pass through their territories to reinforce them.
Military reinforcements followed shortly afterwards: Damien de Martel [fr] left Toulon on 18 October with a squadron consisting of the Dauphin (flagship), the Soleil, La Lune, the Notre-Dame, the Espérance (flûte) and the Triton (fireboat).
[13] Still besieged and judging Djidjelli too difficult to hold, the French demolished it's fortifications and abandoned it, taking ship during the night of 30–31 October 1664.