 This marked the beginning of the largest set of renovations to be undertaken since the expansions conducted under the Mamluk Sultanate . Abd al @-@ Rahman Katkhuda was appointed <unk> ( head of the Janissaries ) in 1749 and embarked on several projects throughout Cairo and at al @-@ Azhar . Under his direction , three new gates were built : the Bab al @-@ Muzayinīn ( the Gate of the Barbers ) , so named because students would have their heads shaved outside of the gate , which eventually became the main entrance to the mosque ; the Bab al @-@ Sa <unk> ( the Gate of the Sa <unk> ) , named for the Sa <unk> people of Upper Egypt ; and , several years later , the Bab al @-@ <unk> ( the Soup Gate ) , from which food , often rice soup , would be served to the students . A prayer hall was added to the south of the original one , doubling the size of the available prayer space . Katkhuda also refurbished or rebuilt several of the riwaqs that surrounded the mosque . Katkhuda was buried in a mausoleum he himself had built in Al @-@ Azhar ; in 1776 , he became the first person ( and the last ) to be interred within the mosque since <unk> al @-@ <unk> , a female mystic who had died around 1588 . 
