 This distrust made al-Qadir urge Mahmud to have Hasanak executed, which, Mahmud, however, declined.One year later, Mahmud appointed Hasanak as his "vizier", thus succeeding the disgraced former vizier Ahmad Maymandi, who was an enemy of Hasanak.During Hasanak's vizierate, he became a prominent and influential figure.