 Ilghazi was dismissed as "shihna" in 1104 and became leader of the Artukid family after the death of Sökmen that year.This was disputed by Sökmen's son Ibrahim, but Ilghazi took Mardin from him in 1108.As head of the Artukids he made no lasting alliances and frequently switched sides, allying with both fellow Muslims and Christian crusaders whenever he saw fit.