Elsewhere however their incursions were no more than temporary, and it was not until the rise of the Saffarid dynasty in the ninth century that the frontiers of Islam effectively reached Ghazni and Kabul.
During the Soviet occupation of 1979 to 1989, Kandahar province witnessed many fights between Soviet and local Mujahideen rebels.
After the Soviet withdrawal the city fell to Gul Agha Sherzai, who became a powerful warlord and controlled the province.
The large defensive wall around the city was finally removed in the early 1930s by the order of King Nader Khan, the father of King Zahir Shah.
Mahmud of Ghazni made the area part of the Ghaznavids in the 10th century, who were replaced by the Ghurids.