Abdallah al-Ghalib
Ahmad was the fifth son of Mohammed ash-Sheikh who was the first Saadi sultan of Morocco. His mother was the well-known Lalla Masuda. After the murder of their father, Mohammed in 1557 and the following struggle for power, the two brothers Ahmad al-Mansur and Abd al-Malik had to flee their elder brother Abdallah al-Ghalib (1557–1574), leave Morocco and stay abroad until 1576. The two brothers spent 17 years among the Ottomans between the Regency of Algiers and Constantinople, and benefited from Ottoman training and contacts with Ottoman culture. More generally, he "received an extensive education in Islamic religious and secular sciences, including theology, law, poetry, grammar, lexicography, exegesis, geometry, arithmetics and algebra, and astronomy."