In 1553 the Turks under Salah Rais, pasha of Algiers, captured Tlemcen and the Sultanate of Tagrart, as it was still frequently called, came to an end.
To Salah Bey, who ruled from 1770 to 1792, we owe most of the existing Moslem buildings.
Aghrem Baba Saad, a small ruined town to the west of Ghardaia, is the fortified post in which the Beni-Mzab took refuge when the Turks under Salah Rais (about 1555) attempted unsuccessfully to subjugate the country.
In 1555 Salah Rais, pasha of Algiers, set men to work to pull it down, but the records say that the attempt was given up because big black wasps came from under the stones and stung them to death.
In 1173 Nureddin died, and his kingdom was seized by Saladin (Salah ed-Din), a man of Kurdish origin, who had previously distinguished himself by capturing Egypt in company with Shirkuh, the general of Nureddin.
The fine mosque of Sidi-el-Kattani (or Salah Bey) dates from the close of the 18th century; that of Suk-er-Rezel, now transformed into a cathedral, and called Notre-Dame des Sept Douleurs, was built about a century earlier.
They then came in contact with the Berghwata, a Berber people of central Morocco, who followed a heresy founded by Salah ibn Tarif 300 years previously.
He was despatched by Salah Bey, captain of his guards (1747).