Collapse of the Zayyanids of Tlemcen The weakening of the
Zayyanids of
Tlemcen, playing on their alliances with
Spain, the Turks of Algiers and the
Wattasids to maintain themselves, opened up a political void in western Algeria. The founding of the Regency of Algiers (1512–1529) then its integration into the
Ottoman Empire was done at the expense of the Zayyanids in the west and the
Hafsids in the east. The regency of Algiers, directed by the exogenous Turkish element of its militia, extended its influence to the west through the play of
maraboutic alliances and brotherhoods. However, the advent of the
Sharifian
Saadians in Fez in 1550 upset this game of alliances. The Regency of Algiers could not count on the support of maraboutics against sovereigns claiming descent from
Muhammad. Negotiations therefore began concerning the territories formerly under Zayyanid suzerainty, which were not successful.
Saadian attempts in Oran In 1545, the Saadians allied themselves with the Spaniards. The Cherifian army took Tlemcen without fighting in 1550 and marched on Algiers. The
beylerbeys of the Regency of Algiers and the Sultan of the
Beni Abbas then concluded the pact of Aguemoun Ath Khiar. They
retook Orania and Tlemcen in 1551; The victory was exploited politically by Algiers and played a role in the formation of Algeria (prefiguring its borders). This conflict opened a period of Algerian-Cherifian hostility which only ceased in 1585 with the intervention of the Ottoman sultan. From then on, for about a century, the border at the Moulouya river was respected. On the other hand, the fall of the Zayyanids of Tlemcen opened the way for the Saharan conquests of the Saadians, who were anxious to control the trans-Saharan
trade routes that had been left vacant. The Regency could not engage in distant Saharan expeditions, but troops were sent from at the request of Ksourians facing
rezzous from
Tafilalt.{{Cite book|last=Bellil|first=Rachid|url=https://books.google.com/books?id=jaEFbCzF8QMC|title=Les oasis du Gourara, Sahara algérien: Fondation des ksour. II == Notable battles ==