The Saadians were an important chapter in the history of Morocco. They were the first Arab Sharifian dynasty to rule Morocco since the Idrisids, establishing a model of political-religious legitimacy which continued under the later Alaouites, another Sharifian dynasty. They successfully resisted Ottoman expansion, making Morocco the only part of North Africa to remain outside Ottoman suzerainty, but followed Ottoman example by modernizing their army and adopting gunpowder weapons. During the long reign of Ahmad al-Mansur in the late 16th century, Morocco established itself as an ambitious regional power that expanded into West Africa and pursued relations with Europe, including a potential alliance with England against Spain. The Saadians were also significant patrons of art and architecture, with Abdallah al-Ghalib and Ahmad al-Mansur both responsible for some of the most celebrated monuments of Moroccan architecture.