Ghazni (also spelt Ghizni and Ghuznee), a fortified town of Afghanistan, stands below a spur of a range of hills, at an elevation of 7729 feet, 84 miles SW. of Kabul, on the road to Kandahar and at the head of the Gomal route to India. It is a place of considerable commercial importance. The climate is cold, snow often lying for three months in the year. Nevertheless, wheat, barley, and madder are grown in the vicinity. Its population is estimated at about 10,000. From the 10th to the 12th century Ghazni was the capital of the empire of the Ghaznevids (see below); it then fell into the hands of the sultan of Ghûr, and enjoyed a second period of splendour. Having shortly afterwards been captured by the Mongols, it rapidly fell into decay. It remained, however, subject to the descendants of Baber, the Mongol rulers of Delhi and Agra, down to 1738, when it was taken by Nadir Shah of Persia, and at his death was incorporated in the kingdom of Afghanistan. During the 19th century it figured in the British wars against the Afghans, having been stormed by Lord Keane in 1839, and again in 1842 by the Afghans, but retaken the same year by General Nutt. In the neighbourhood of Ghazni there are several ruins and monuments of its former greatness, such as the tomb of Mahmud, Mahmud's dam in the Ghazni River, numerous ruin-heaps north-east of the town, and many Mohammedan shrines. The celebrated gates of Somnath (q.v.) were kept at Ghazni from 1024 to 1842.
Ghaznevid Dynasty.—About the middle of the 10th century a lieutenant of the Samanid ruler of Bokhara seized upon Ghazni, and, dying in 977, left it to his son-in-law, Sebuktagin, who during a reign of twenty years extended his sway over all modern Afghanistan and the Punjab. But it was under his son Mahmud (997–1030) that the Ghaznevids reached their highest point of splendour and renown. This prince repeatedly invaded India, and carried his conquering arms as far as Kurdistan and the Caspian on the west and to Samarkand on the north. He was the first monarch in Asia to assume the title of sultan. His descendants had a keen struggle to maintain themselves against the Seljuks, who had seized upon Khorasan, Balkh, Kharezm, and Irak during the reign of Mahmud's son Masaud (1030–42), and against their jealous rivals the princes of Ghûr (q.v.). Bahram Shah, ruler of Ghazni from 1118 to 1152, was at length driven from his capital by the latter, and retired to the Punjab. There his grandson, Khosrau Malek, the last of the dynasty, made Lahore his capital. This town was, however, taken by the prince of Ghûr in 1186, and with this the Ghaznevid dynasty came to an end.