Battle of Chach

The Battle of Chach or Battle of Chaach was fought in 1007 AD between the Ghaznavid army of Mahmud of Ghazni and the Hindu Shahi army of Anandapala, near Hazro, resulting in the latter's defeat. This left the north Indian region vulnerable to further invasions.

Background
After having invaded the Principality of Bhatiya (1004-5) and the neighbouring Emirate of Multan (1006), Mahmud mounted an invasion of the Hindu Shahis circa December 1006, for reasons which are not clear. Correspondence shows that Anandapala actually seems to have had favourable dispositions towards the Muslims. Mahmud left Ghazni with his force on December 31, 1006, for a spring campaign into India. This was his sixth expedition into India.

A huge army, composed of the Hindu Shahis and allied Rajas was placed under the command of Anandapala's son (Trilochanapala) to meet the invasion. Trilochanapala failed to prevent Mahmud's troops from crossing across the Indus, and Mahmud then set out for the plains of Chaach as the battleground.

Battle
For 40 days both armies remained entrenched, until Mahmud tried to lure out the Shahis using a combat unit of 6,000 archers. This failed, as the unit was destroyed by the Hindu Shahis. Emboldened, about 30,000 troops of the Gakhar allies of the Shahis attacked Ghaznavid positions, killing about 5,000 Ghaznavid troops.

The Ghaznavids were in a difficult position and Mahmud managed to regain the upper hand only by having his elite personal guards launch a rear-attack. This caused the Shahi forces to become disorganized and eventually flee, losing about 20,000 men in the encounter. The victorious army of Mahmud captured one of the sons of Anandapala, vast amounts of spoil and 30 combat elephants.

Aftermath
The battle was the last occasion on which Mahmud and Anandapala could confront their armies. Mahmud pursued the fleeing Hindu Shahi troops as far as the Kangra valley, where they took refuge in the fort of Bhim or Nagarkot, but capitulated after three days.

Mahmud installed Governors in the lands he had conquered, and returned to Ghazni by June of the next year. Anandapala sent an embassy to Mahmud, with a proposal for peace, which was accepted. The Hindu Shahis had accept tributary status, provide some level of military support, guarantee passage of troops, and remit an annual tribute. Mahmud also sent his own agents to oversee the enforcement of the peace-treaty and within a year, normal trade relations had resumed.