Mahmud of Ghazni came to power in 998 CE, in Ghazna, Afghanistan, south of Kabul and the Hindu Kush range. He began a military campaign that rapidly brought both sides of the Hindu Kush range under his rule. From his mountainous Afghani base, he systematically raided and plundered kingdoms in north India from east of the Indus river to west of Yamuna river seventeen times between 997 and 1030. Mahmud of Ghazni raided the treasuries of kingdoms, sacked cities, and destroyed Hindu temples, with each campaign starting every spring, but he and his army returned to Ghazni and the Hindu Kush base before monsoons arrived in the northwestern part of the subcontinent. He retracted each time, only extending Islamic rule into western Punjab.