# Hindu Shahi–Saffarid wars

The Hindu Shahi–Saffarid wars were a series of military conflicts fought between the forces of the Hindu Shahis and the Saffarids.

## Background

The predecessor of the Hindu Shahis were the Turk Shahis. They suffered great reverses from the Abbasid Caliphate which paved the way for the Brahmin vazir of the Turk Shahi king Lagaturman who was Kallar.

### Abbasid Invasions of Khorasan and the Brahmin Revolution

Abbasids under the caliph Al-Ma'mun had invaded the Kabul as well the Gandhara branch of the Turks and had made them embrace Islam and cede key cities and regions as well as to pay a high tribute for territorial mutuality.
As per Al-Biruni, Kallar by chance finds treasury and purchases his power and imprisons the king, hence establishing the Hindu Shahi kingdom which was a Hindu Brahmin kingdom.

### Yaqub's campaigns against Zunbils

In 846, Salih ibn al-Nadr allied with Yaqub ibn Laith to take control of Bust and Zarang. By 861, according to the Tarikh-i Sistan, Yaqub had emerged as the most powerful figure in Sistan, defeating the Kharijites and overthrowing the newly appointed commander of the Sistan army. In 863, Yaqub marched on Bust, forcing Salih to flee to the Zunbil. However, Yaqub could not pursue him at that time. The following year, in 864, Yaqub confronted the combined forces of the Zunbil and Salih. During the battle, he killed the Zunbil (referred to as either 'Lakan the Lak' or 'Kbtir'), three other princes, and 6,000 soldiers. Salih ibn al-Nadr was captured while fleeing and imprisoned.
Yaqub then installed the Zunbil's relative, Salih ibn al-Hujr, as governor of Al-Rukhkhaj. However, Salih rebelled and later committed suicide while under siege by Yaqub in his stronghold at Kuhaz in late 867. Xuanzang's seventh-century accounts of the Bannu region suggest a significant Hindu presence, which likely persisted into the ninth century. Historical evidence, including the Tochi inscriptions, indicates that while Kharijite settlers may have moved into the Tochi area by the 850s, the region likely remained under the Zunbil's control until 867. During this period, the Zunbil maintained authority over Al-Rukhkhaj and Zabulistan, with the Bannu district likely still part of their domain.

## Conflicts
### Battles of Kabul

By 870, Ya'qub ibn al-Layth had built the Saffarid Empire and quickly expanded onto Ghazni, defeating the Zunbils. His victory led to the first battle of Kabul, where he defeated Samanta, the Hindu Shahi king, and took him as a prisoner of war, as recorded in Rawżat aṣ-ṣafāʾ. According to the Tarikh-i Sistan, Ya'qub appointed a relative of Samanta, Shri Khudarayaka, as the governor of Kabul. Ya'qub also launched campaigns into the Kabul Valley, destroying the temple of Naushad and looting the sacred temple of Kabul, transferring its wealth to the caliph. Kabul remained under Saffarid control until Ya'qub's death in 878–879, after which Lalliya, noted as a courageous ruler by Kalhana, likely regained control of Kabul.
During Ya'qub's campaigns, he extended Saffarid influence between Ghazni and Al-Rukhkhaj while dealing with rebellions, including that of Salih ibn al-Hujr and the escape of the Zunbil prince, 'Kbr' or 'Piruz'. Despite setbacks, the Hindu Shahi dynasty retained control over regions like Ningrahar and Logar, where they crowned their rulers. These regions, alongside Kabul, were strategically vital due to key trade and military routes, such as the Khyber, Kurram, and northern passages via Kunar, Bajaur, Talash, and Swat. Sakawand, though south of Kabul and northeast of Ghazni, remained part of Zabulistan and outside the Hindu Shahi domain.

### The later Hindu-Shahis (c. 880–964)

The chronology of the Hindu Shahi dynasty becomes closely linked with the Saffarids during this period. Bhimadeva, who ruled from 921 to 964, is noted for neglecting the defense of Kabul, which hastened the dynasty's decline. Bhimadeva, also referred to as Paramabhattaraka Maharajadhiraja Paramesvara Shri Bhimadeva Shahi, is mentioned in sources like Al-Biruni, Hindu-Shahi coins, the Rajatarangini, and the Hund slab inscription. According to scholar A. Rehman, by the mid-10th century, Islamic pressure on Kabul and Ghazni was immense, and some Kabul elites, including the Shah, had adopted Muslim names and customs. This stood in contrast to the devoutly Hindu Shahis of Hund, potentially explaining the lack of unity between these factions.
Yaqub was succeeded by Amr al-Layth who was indulged in internal conflicts at Khorasan, seeing opportunities, the two Indian princes and governors, Toramana and Asata had invaded Ghazni and defeated it's governor Fardaghin. Archaeological evidence from Kafirkot North suggests Hindu temples were still being constructed in the 10th century, indicating either Hindu Shahi rule over the Bannu region or local Hindu rulers' influence. While Saffarid control over Kabul marked a temporary shift, it waned after 900. The Hindu Shahis regained Ghazni, ruling it through allies like the Lawiks. The proximity of Ghazni and Hund to Bannu suggests it may have been a province under Shahi or Lawik sovereignty, though direct evidence is lacking. After this period, little is known about the administrative or social history of the Bannu region.

## Aftermath

By the reign of Kamaluka, the Saffarids had greatly lost power to the Samanids which resulted in a power vacuum and rise of the Lawik dynasty in Ghazni which would later join marital ties with the Shahis as well as would fight wars against the Samanids.