Ali ben Abdallah Er-Riffi was the commander of the Sharifian army when they drove the English out of Tangier on February, 5 1684/ Safar 18, 1095 AH. After that, he was named Pasha of Tangier, and remained in that position until his death in 1713/1125 AH. He was responsible for rebuilding the fortifications of the city after they were destroyed by departing English forces. He was succeed by Ahmed Ben Ali Er-Riffi.