Hund was the last capital of Gandhara under the Hindu Shahi rulers until the beginning of 11th century AD. when Mahmud of Ghazna defeated Anandapala, the last Hindu Shahi ruler in Gandhara. The Hindu Shahi capital was then shifted to Nandana in the Salt Range, Punjab. It has also been said that the Mongol invader Changez Khan (Genghis Khan) also followed Khwarzim Shah up to Hund, before the prince jumped into the Indus River on his way to India.