 He also married off a daughter to Mahmud's son Muhammad of Ghazni.When Abu'l-Nasr died in around 1010, Muhammad took over the rule of Guzgan, even though Abu'l-Nasr had left a son, Hasan.This marked the end of Farighunid rule.