The Battle of Tlemcen took place in 1696 when a Moroccan expeditionary force conducted a raid in Algerian territory. The Algerians emerged victorious, seriously wounding the Alawi prince.
Background
Previous attempts to invade Algerian territory, such as the Battle of Djebel Amour and the Battle of Moulouya, ended in victories for the Algerian forces. A further defeat was inflicted against the Moroccans in 1694, Moulay Ismail also had a tribute imposed on him by the Dey of Algiers.
In the summer of 1695, an Algerian embassy in Meknes protested the incursions that had occurred over the previous years. A move was made by the Alawites in November when the Alawite prince was dispatched at the head of an expeditionary force composed of 4,000 abid.
The Battle
On February 6, the Dey decided to launch a campaign against the Moroccans. His forces consisted of 300 tents and another 105 tents stationed in Tlemcen. The preparations for the campaign were in place when on February 12 the Moroccan forces plundered the Tlemcen region. The Moroccan expeditionary force was conducting a tax raid and the rearguard of this force was ambushed by the Algerians, the Moroccans were heavily defeated.
Another conflict broke out when in July or the beginning of August the eldest son of Moulay Ismail with a force composed of 30,000 men had to take flight and abandon his provisions as well as 150 abid who were captured by the Algerians. It was at this time that rumours began circulating about how the Bey of Tlemcen was regaining the advantage after approaching Mostaganem. It was there that the Alawi prince clashed with the infantry of Tlemcen on one side and the cavalry of Algiers on the other. The Moroccan prince was defeated and seriously wounded.
Moulay Ismail made peace with the Algerians in 1696. Despite the peace agreement, further expeditions followed, resulting in a Moroccan-Tunisian alliance against the Algerians in the Maghrebi war. Moulay Ismail repeatedly sent letters to the Ottoman sultan, urging him not to protect the Algerians and describing their activities as greedy pursuits. However, by this era, Ottoman-Moroccan hostility had ceased, but tension with the Algerians continued. The Porte was unlikely to take any action to prevent the Algerians from acting, given the lack of control it exercised in Algiers.