 Following his father's death in 1032, Harun was effectively made governor of Khwarazm by the Ghaznavid sultan Mas'ud.The title of Khwarazm-Shah was not given to him, but to Mas'ud's son Sa'id; Mas'ud had been distrustful of Altun Tash and probably wanted to avoid giving his son too much power.In 1034, however, Harun revolted against Mas'ud, assuming the title of Khwarazm-Shah, and turned to the Ghaznavids' enemies, the Karakhanids of Samarkand and the Seljuks, for support.