remained the King of Garhwal from 1684 to 1716, and is most known for taking part in the Battle of Bhangani on 18 September 1688, where combined forces of many Rajas of the Shivalik Hills (Pahari rajas) fought with 10th Sikh Guru Gobind Singh's army. During his reign, Sikh Guru and the ex-communicated eldest son of Har Rai, Ram Rai settled here, upon recommendations of Aurangzeb, which eventually led to the establishment of modern town of Dehradun. Fateh Shah died in 1716, and his son Upendra Shah died within a year of ascending to the throne in 1717, subsequently Pradip Shah ascended and his ruled led to rising fortunes of the Kingdom, this in turn attracted invaders, like Najib-ud-daula Governor of Saharanpur, who invaded in 1757 along with his Rohilla Army and captured Dehradun. However, in 1770, the Garhwali forces defeated the Rohillas and retrieved possession of the Dun region. 'Harshadev' a former minister of Kumaon Kingdom and king Lalit Shah joined forces to attack Kumaon and captured almora the seat of Kumaon Kingdom, expelled the ruling king Mohan Chand and placed his own younger son on the throne. However, later Mohan Chand on (1786–1788) overthrew Pradyumna Shah and retained Kumaon Kingdom.<ref>{{Cite book|last=Pande, Badri Datt|title=History of Kumaon (English version of "Kumaon Ka Itihas").|date=1993|publisher=Shyam Prakashan|isbn=81-900209-4-3|oclc=833063116}}</ref> In 1791 Gorkha forces of the Kingdom of Nepal, invaded Kumaon and took control of most of the hill country, expelling or subduing most of the rajas. After defeating kumaon, Gorkha Kingdom attacked Garhwal and Garhwali forces suffered heavy defeat, and Pradyumna Shah first escaped from Srinagar to Dehradun and then to Saharanpur to organise forces, but was eventually killed in the Battle of Khurbura (Dehradun) in January 1804 while his brother, Pritam Shah, was taken in captivity to Nepal by the Gorkhas. The Battle of Khurbura took place on Magh 20, 1860 V.S. (January 1804) where the Gorkhas were under the command of Bada Kaji Amar Singh Thapa. Several causes are attributed to this defeat. Garhwal was perpetually in political turmoil since the time of Raja Jayakrit Shah and this was sapping the vitality of the kingdom. Nature also played havoc in the form of a famine before the Gorkha onslaught from 1795 to 1795. Garhwal had not yet recovered from the famine when a devastating earthquake struck the region. Twelve-year Gorkha occupation (Gorkhyani) The Garhwal kings went into exile in British territory as the