After the invasion of Tibet and plundering of Digarcha by Nepali forces under Prince Regent Bahadur Shah in 1792 , the Dalai Lama and Chinese Ambans reported to Chinese administration for military support . The Chinese and Tibetan forces under Fu Kang An attacked Nepal but went for negotiation after failure at Nuwakot . The 1806 Bhandarkhal massacre instigated upon the death of King Rana Bahadur Shah , set forth the rise of authoritative Mukhtiyar ( premier ) Bhimsen Thapa who became de facto ruler of Nepal from 1806 to 1837 . During the early nineteenth century , however , the expansion of the East India Company 's rule in India led to the Anglo-Nepalese War ( 1814 – 1816 ) , which resulted in Nepal 's defeat . Under the Sugauli Treaty , the kingdom retained its independence , but in exchange for territorial concessions making Mechi River to Mahakali River its boundary under Nepalese rule , sometimes known as " Greater Nepal " . In the political scenario , the death of Prime Minister Mathbar Singh ended the Thapa hegemony and set the stage for Kot massacre which resulted in the ascendancy of the Rana dynasty of Khas Rajput ( Chhetri ) origin , which made the office of Prime Minister of Nepal hereditary in their family for the next century , from 1843 to 1951 . Beginning with Jung Bahadur , the first Rana ruler , the Rana dynasty reduced the Shah monarch to a figurehead role . Rana rule was marked by tyranny , debauchery , economic exploitation and religious persecution
Kot massacre
Kot massacre
Kingdom of Nepal