The eastern part of the Samanid Empire was ruled by governors, who like most of the army were slaves captured among the Central Asian Turkic peoples. Under Sebüktigin, a process to sever ties began that was completed by his son Mahmud (998-1030). The city of Ghazna became the capital of the new Ghaznavid Empire. Through large-scale military campaigns, it expanded into the former Buyid and Samanid regions of Iran in the west and up to the Oxus River in the north. Mahmud’s military operations were also directed to the east and south, and he carried out a total of 17 campaigns into northern and central India. They were justified as jihad (“holy war”), since they were directed against the heathen Hindus, whose temples were destroyed. From the realms in northern India, Mahmud brought back rich booty, which in addition to financing his large military machine was used to build up Ghazna as a fitting capital. Mahmud also attracted the leading intellectuals of the period, such as Firdawsi, to lend luster to the Ghaznavids’ new court. The Ghaznavid Empire reached its greatest size under Mahmud. Soon it came under pressure from new Turkic dynasties, such as the Seljuks and the Ghurids.

The mountainous region of Ghur in Afghanistan was inhabited by a Turkic people that had been used as slaves in Muslim armies for years. Under the Ghaznavids, however, the Ghurids became Muslims and vassals, but soon gained their independence and grew into a new and expanding power. They captured and plundered Ghazna in 1150 and drove the last Ghaznavids into Punjab, where the dynasty was annihilated in 1186. Their leader was the Ghurid Muizz al-Din Muhammad, who continued the Ghaznavid jihad tradition and penetrated farther into India, where he took Delhi in 1193. He ruled the realm in partnership with his brother Ghiyath al-Din Muhammad, whose army in the west invaded Khorasan, extending the Ghurid Empire from the Caspian Sea to Bengal in eastern India. The realm collapsed soon after the death of Muizz al-Din Muhammad in 1206, partly because of pressure from the Mongols.

Although these Turkic dynasties, the Ghaznavids and the Ghurids, took Persian culture as their ideal in many respects, the effect of Indian culture was also felt in art. This can be seen both in details that were adopted directly from Indian art and in a penchant for figurative, fairly true-to-life depictions.