The Battle of Chelif or Battle of Djidouia took place on 28 April 1701 on the banks of the Chelif River. It was fought between the armies of the Alaouite Sultan Ismail Ibn Sharif and those of the Regency of Algiers commanded by the Bey of Mascara, Mustapha Bouchelaghem. It took place in the context of an attempt by the Alaouites to conquer the west of the Regency of Algiers, coordinated with an offensive by Tunis on the east of the Regency of Algiers in 1700 and 1701.

Background 
As early as the 1690s, a change of course was made in the foreign policy of the Regency of Algiers by the dey Hadj Chaabane; the latter diverted Algiers from the wars of sea racing against the Europeans and sought to federate the entire Maghreb under his authority. His policy was pursued by the dey Moustapha who confronted the joint armies of Tunis and Tripoli in October 1700 before facing the Cherifian Empire of Moulay Ismaël.

Moroccan troops entered the war against the Algerians during the Hegirian year 1111 (1699-1700). This time, this attempt was coordinated with an offensive by the Bey of Tunis on the province of Constantine. 

Moulay Zidan mounted a raid into Algerian territory which resulted in a peace treaty between the two sides, it was claimed that he expelled the garrison at Tlemcen and raided the Bey’s palace, however these achievements are apparently unknown to contemporary comment and may be assumed to be fiction. During the same year an Algerian battalion defeated an Alaouite prince in September while he was on a minor tax raid. Moulay Ismail Ibn Sharif was furious about the peace because it allowed the Regency of Algiers to concentrate on its eastern front and to defeat the army of Tunis between Setif and Constantine.

Ismail Ibn Sharif dismissed his son Zidan from his command and returned to campaign against Algiers. He then advanced as far as the Chelif valley. The dey Hadj Moustapha, victorious in the east, gathered troops of tribal auxiliaries on his way to face up to it. The meeting of the two armies took place in the valley of Chelif, more precisely on the banks of a tributary, the Djidouia.

Battle 
The dey Mustapha left Algiers during the month of April, after his return from his campaign against the Ottoman Tunisia. He did not neglect any preparation for his attack, leaving, according to the French consul Durand, "with a magnificence worthy of a great king". After having traversed the province of Oran, Moulay Ismaïl, who was unable to pay a tribute that was imposed on him by the Regency in 1694, reached the left bank of the oued Chelif.  It was on one of the tributaries of this river, the Djidouia, at a place called Hadj-Bou R'azi, that the two armies met. 

The historian Audiffret, in his work published in 1821, notes that it was with an army estimated at between 10,000 and 12,000 men that the Algerian bey managed to repel the 60,000 soldiers of the Moroccan army. The historian and journalist Léon Galibert wrote in a periodical published in 1846 that 6,000 infantrymen and 1,000 sipahis confronted Ismael's troops, which numbered 50,000 fighters, most of them on horseback. J.E Mercier specifies that the regular forces of the dey Mustapha were followed by "swarms of Arab horsemen" provided by the Algerian tribes, while also claiming that the number of Moroccan troops was probably lower than 50,000. The battle began at noon with a charge of the Algerian cavalry and ended around 4 p.m. with a rout of Ismail Ibn Sharif. The latter, wounded in the fighting, had to escape and narrowly escaped capture. Ismail’s horse had also been taken and later offered to Louis XIV.  The Algerians won a great amount of booty which included a considerable amount of prisoners and horses, 3,000 heads of simple soldiers and 50 heads of captains.

Consequences 
This battle put an end to Ismail Ibn Sharif's Algerian campaign and, temporarily, to his territorial aims. An anonymous Algerian wrote on May 2 to a French correspondent, sending him a copy of Dey Mustapha's letter to his khodja dated 18 April 1701 in the camp. These Letters from Algiers recount the "great advantage that the Algerians gained over the King of Morocco" by tackling the victory of the wadi Djidiouia where Moulay Ismail lost 3000 men, including 50 caids (captains) and 5,000 horses. The Algerian-Moroccan war of 1701 initiated an unexpected and ephemeral rapprochement between the regency of Algiers and Spain.

References

Notes 

18th century in Algeria
18th century in Morocco
Chelif 1701
Chelif 1701
Battle of Chelif
Battle of Chelif