After Alp Arslan had consolidated his power in the Sejluk realm, he appointed Abu Ali Hasan as his vizier who would remain in that position throughout the reigns of Alp Arslan (1063–1072) and Malik-Shah I (1072–1092).