Observing the Turkish menace he decided to nip the evil in bud. With this aim he twice attacked Ghazni but failed in his purpose. The whole of his domain north of the Khyber Pass was gradually lost to him - including the town of Kabul. He continued to rule from Udabhandapura. Sabuktagin also got deeply involved in the affairs of his overlord, the Samanid King of Bukhara.