 Qagmas was intelligent and modest, as well as the overseer of many constructions during the time of Qaitbay.In 882 AH (1477 AD) the Sultan Qaitbay visited the site of the old lighthouse in Alexandria and ordered a fortress to be built on its foundations.The construction lasted about 2 years, and it is said that Qaitbay spent more than a hundred thousand gold dinars for the work on the Citadel.