11 century Minaret of Arslan Jadhib, an official of the Ghaznavid Sultan Mahmud in Sangbast (Khurasan, Iran)
Descended from a Sassanid general who established himself a ruler of Transoxania, the Samanid Dynasty in 960 CE found itself torn between two military families, one of which was headed by the Turkic general Alptigin, who had used his influence to conquer eastern territories and establish himself as a provincial governor at Ghazna (modern Ghazni in Afghanistan). When the Samanid Emir Abu ol-Hasan died in 961 CE and Alptigin's candidate was rejected by the court ministers, he retired from Khurasan (northeastern Iran) to Ghazna, where he ruled as a largely independent sovereign, thus starting the Ghaznavid list in 962 CE.
Alptigin's son-in-law Sebuktigin succeeded him in 977 CE and was recognized as governor of Ghazna by the Samanids. Sebuktigin consolidated and expanded his kingdom eastward to the Indian border, which prompted the Shahi prince Jayapala of Waihind to launch a preemptive strike at Ghazna. Jayapala was defeated and forced to pay a large tribute, and when he defaulted and mobilized a new army, he was defeated again.
Sebuktigin died in 997 CE and was succeeded by his famous son, Mahmud in 998 CE. Only 27 and a staunch Moslem, Mahmud of Ghazna took the title Emir in deference to the Abbasid Caliphate in Baghdad who legitimized his rule. He also adopted the title Sultan, signalling clearly his independence from the Samanids. By diplomacy, he made a treaty with the Qarakhanids (Ilek Khanate) recognizing a boundary along the Oxus River that effectively split the territory of the Samanids. In 999 CE, the Ghaznavids defeated the Samanids (laying claim to Khurasan) and the Qarakhanids captured Bukhara, the Samanid capital.
With his kingdom secure, and with encouragement from the Caliph, Mahmud turned his attentions eastward in 1001 CE, vowing to invade India once a year to bring the word of Allah to the Hindu kingdoms of India by fire and sword.
His first major campaign in northern Indian was against Jaipal, the Hindu ruler of the Punjab. In battle near Peshawar, Mahmud's 15,000 Ghulam cavalry routed Jaipal's army of 12,000 horse, 30,000 foot and 300 elephants, leaving nearly half their number dead. Jaipal was captured and released to rule as a tributary, but was so grief-stricken by his defeat and despised by his people for it, that he abdicated in favor of his son Anandpal and immolated himself on his own funeral pyre.
It took several years, but Anandpal was able in 1008 CE to raise a large army with contingents from the Hindu princes of Ujjayan, Gwalior, Kalinjar, Kannaws, Delhi, and Ajmerand to take the field against Mahmud. The respective armies encamped at Peshawar and Und for 40 days, challenging each other to engage. When the battle finally materialized, Mahmud found his army hard pressed by the fierce attack of Khokar tribemen on both flanks when a stray arrow panicked Anandpal's elephant causing it to flee the field. Seeing their leader in apparent flight broke the morale of the Indian army and ensured Mahmud's decisive victory.
Mahmud launched a total of 17 campaigns into Indian between 1001 and 1026 CE, annexing the Punjab, establishing a provincial governor at Lahore, and consolidating northeastern Indian before looking south. The Indian kingdoms of Nagarkot, Thanesar, Kannawj and Kalinjar were all conquered and left in the hands of Hindu vassals. With the tribute and plunder gained from his campaigns, he transformed Ghazna into one of the leading cities of Central Asia, patronizing scholars, establishing colleges, laying out gardens, and building mosques, palaces, and caravansaries.
In his last Indian campaign in 1024 CE, Mahmud reached the southern coast of Kathiawar along the Arabian Sea, where he sacked the city of Somnath and destroyed its famous Hindu temple to Shiva (whose mystical idol was apparently levitated by magnetic forces).
Mahmud returned home in 1026 and spent the last four years of his life contending with the influx of Oghuz Turkic horse tribes and opportunistically seizing Rayy (1029 CE) and Hamadan from the distracted Buyid (Daylami) Dynasty.
His son Mas'ud (1031-1041 CE) continued the policy of allow Oghuz tribes to graze in Khorasanian territory until 1038 AD, when the tribes united under an Oghuz leader named Seljuq and claimed Ghaznavid territory as their own. Mas'ud also faced a threat on his Indian frontier in the person of Ahmed Niyaltigin, the Ghazanvid governor in Lahore, who manifested rebellious intentions. Mas'ud dispatched a Hindu ally general Tilak, who defeated and killed Niyaltigin, thus securing Lahore. In the west, however, the Seljuq tribes decisively defeated the Ghaznavid army at Dandanqan (1040 AD). Unable to defend Khorasan and his lands in Central Asia, Mas'ud decided to move his court to Lahore, but was deposed by his guards near the Marghila pass between Attock (Atak) and Rawalpindi during transit.
A Minaret in Ghazni, capital of Sultan Mahmud
A new Sultan was named and the Ghaznavid kingdom, now reduced to eastern Afghanistan and northern India) continued until1186 CE with its capital at Lahore. In 1150 CE, Ala Al-Din Hussain (Janansuz) of Ghur sacked Ghazna and drove back the Seljuqs until he was defeated and captured. In the interim, the Ghaznavid ruler Bahram was able to briefly reoccupy the remains of Ghazna until his death, when the Seljuqs forced the next Ghaznavid monarch to retire to Lahore. The Ghaznavid dynasty continued until 1186 CE, when the Ghurids under Muhummad Bin Sam overran Lahore and continued their campaign of conquest in northern India.
Ghazni, Centre of the Islamic civilization
Ghazni played a centre role politically and culturally in Islamic civilization. Until then unknown and insignificant, it became one of the most brilliant capitals of the Islamic world. The Ghaznavids carried the Central Asian architectural style to the eastern part of their empire. In Bukhara, Merv and other places on the left bank of the Oxus, from Charjuy to Sarakhs, one could still find some anonymous tombs of brick with the dates falling within the Ghaznavid period. Great mosques and sumptuous palaces, surrounded by carefully rendered gardens, rose to be adorned with the gold and gems of India. Here the era's most illustrious poets, artists, architects, philosophers (Ibn Sina was born in Balkh in 1080 CE), musicians, historians, artists and craftsmen gathered under the keen patronage of the court.
In 1030 CE, Mahmud Ghazni dies, and the Ghaznavid dynasty began to fall apart after his death. The emptiness and ruins are even more apparent at Ghazni, victim of successive onslaughts, where only two minarets and the tomb of the great conqueror Sultan Mahmud still remain. From mounds of rubble at the feet of the minarets, however, Italian archaeologists, under the direction of Umberto Scerrato, have rescued impressive evidence of the splendor and glory that once radiated throughout the world from this great capital city.