The Kingdom of Nepal (Nepali: नेपाल अधिराज्य) was a Hindu kingdom in South Asia, formed in 1768 by the expansion of the Gorkha Kingdom, and disestablished and replaced by the Federal Democratic Republic of Nepal in 2008. The king of Nepal served as its head of state, and it was also known as the Gorkha Empire (Nepali: गोरखा अधिराज्य), or sometimes Asal Hindustan (Nepali: असल हिन्दुस्तान, lit. 'Real Land of the Hindus'). The kingdom was founded by King Prithvi Narayan Shah, a Gorkha monarch of the Shah dynasty who claimed to be of Thakuri origin from chaubisi.
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 the Chinese administration for military support. The Chinese and Tibetan forces under Fuk'anggan attacked Nepal but went for negotiations after failure at Nuwakot. Mulkaji Damodar Pande, who was the most influential among the four Kajis, was appointed after the removal of Bahadur Shah. Chief Kaji (Mulkaji) Kirtiman Singh Basnyat, tried to protect king Girvan Yuddha Shah and keep former king, Rana Bahadur Shah away from Nepal. However, on 4 March 1804, the former king came back and took over as Mukhtiyar and Damodar Pande was then beheaded in Thankot. The 1806 Bhandarkhal massacre instigated upon the death of Rana Bahadur Shah, set forth the rise of the authoritative Mukhtiyar Bhimsen Thapa, who became the 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.