 This permissiveness, which manifested in far more relaxed conditions for new mamluks, encouraged the pursuit of military careers in Egypt by aspiring mamluks outside of the country, to the point that parents would sell their children as mamluks with the belief the children would enjoy an improved standard of living.Under an-Nasir Muhammad, the Mamluks successfully repelled an Ilkhanid invasion of Syria in 1313 and then concluded a peace treaty with the Ilkhanate in 1322, bringing a long-lasting end to the Mamluk-Mongol wars.Following the détente, an-Nasir Muhammad was able to usher in a period of stability and prosperity in the sultanate through the enacting of major political, economic and military reforms that were ultimately intended to ensure his continued rule and consolidate the Qalawunid-Bahri regime.