[2][4] After a failed revolt Ali Pasha took refuge in Algiers where he managed to gain the support of the Dey.
[4][5] The Dey of Algiers dispatched a force of 7,000 men to invade Tunis and install Ali Pasha there as its Bey.
[2] After the doors were opened at night an army that attempted to defend Tunis was greatly massacred.
[2] The Algerians captured Tunis and installed Ali Pasha as the Bey and as a vassal of Algiers.
[2] The Bey Ali Pasha recognised himself as a vassal of Algiers and paid an annual tribute to the Dey.