Under the Mamluks, Al-Azhar gained influence and rose in prestige.[1] The Mamluks established salaries for instructors and stipends for the students and gave the institution an endowment.[2] A college was built for the institution in 1340, outside of the mosque.