They controlled regions in present-day Afghanistan and Pakistan. This allowed them to resist early Turkic invasions until their defeat by Mahmud of Ghazni.