Hasanak the Vizier

Abū Alī Hasan ibn Muhammad ibn Abbās, better known as Hasanak the Vizier (حسنک وزیر), also Hasanak Mīkālī (حسنک میکالی), was an Iranian statesman from the Mikalid family, who served as the vizier of the Ghaznavid sultan Mahmud from 1024 to 1030. After having been removed from the vizier, Hasanak still continued to be an important and influential figure in the Ghaznavid state. However, he later fell out of favor and was executed by hanging during the reign of Mahmud's son Mas'ud I. Hasanak's official charge was infidelity which was a politically motivated charge, and his execution was ordered by the Abbasid caliph of Baghdad.

Biography
Hasanak was the son of a certain Abbas and was a member of the Mikalid family, an Iranian family which traced its descent back to the Sogdian king Divashtich, and to the Sasanians. Not much is known about Hasanak's early life, except that at a young age, he served as the governor of Khorasan. He also served as the rais of his native city, Nishapur. Later in 1023, Hasanak went to a pilgrimage in Mecca, and later went to Fatimid Egypt, where he was treated with honor by the Fatimid caliph Ali az-Zahir.

However, Hasanak's relations with the Fatimids made the Abbasid caliph al-Qadir distrust him for being a believer of Shia Islam, which was seen as a heretical faith by the Sunni Abbasids and other Sunni Muslims. 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.

Mahmud later died in 1030, and a civil war shortly ensued between his two sons, the youngest one is the heir Mohammad Ghaznavi (who shortly had Hasanak changed with Abu Sahl Hamduwi as vizier), and the oldest one being Mas'ud I. Hasanak, along with Ali ibn Il-Arslan, supported Mohammad, and both expected that they would hold absolute power over the Ghaznavid state, while Mohammad would stay as a figurehead. However, Ali, including another Ghaznavid statesman, began to become more distant from Hasanak and changed their adherence to Mas'ud I.

Hasanak, however, continued to support Mohammad, but Mas'ud I shortly marched towards the Ghaznavid capital of Ghazni, where he successfully defeated Mohammad and imprisoned the latter. He then had Hasanak imprisoned in Balkh, while restoring Ahmad Maymandi to the vizier office. Through the efforts of Hasanak's opponent Abu Sahl Zawzani, Mas'ud had charged Hasanak of infidelity, and had him executed on 14 February 1032. The tribunal and execution are vividly described by Abu'l-Fazl Bayhaqi in his Tarikh-i Bayhaqi.