Sangramaraja

Sangramaraja or Samgramaraja (IAST: Samgrāmarāja) was the founder of the Lohara dynasty and ruled Kashmir from 1003 to 1028. During his reign, Mahmud of Ghazni tried to invade Kashmir twice but had to retreat both times after suffering heavy casualties.

Rule
Sangramaraja was adopted by his aunt Didda and appointed as her heir and become the ruler in 1003. His rule lasted till 1028.

Sangramaraja's queen was Srilekhā, who was very talented and advised Sangramaraja in his rule and when Mahmud of Ghazni attempted to invade Kashmir.

Battles against Mahmud of Ghazni
In 1014, Mahmud of Ghazni attacked the Kabul Shahi kingdom. The Kabul Shahi ruler Trilochanapala appealed to Sangramaraja for assistance against Mahmud. Sangramaraja responded by sending a large army under his commander-in-chief, Tunga to aid Trilochanapala. In the ensuing battle, Trilochanapala was defeated.

Antagonized by Sangramaraja's having helped Trilochanapala, Mahmud invaded Kashmir. He advanced along the Tohi river valley, planning to enter Kashmir through the Tosamaidan pass. However, his advanced was checked by the strong fort of Loharkot. After having besieged the fort for a month, Mahmud abandoned the siege and retreated, losing many of his troops on his way and almost losing his own life as well. In 1021, Mahmud again attempted to invade Kashmir, but was again not able to advance beyond the Loharkot fort, due to heavy snowfall. After the two failed invasion attempts, he did not attempt to invade Kashmir again.