Kingdom of Nepal

           In the mid-18th century, Prithvi Narayan Shah, a Gorkha King, set out to unify the kingdoms. Seeking arms and aid from India, and buying the neutrality of bordering Indian kingdoms, he embarked on his mission in 1765. After several bloody battles and sieges, he managed to unify the Kathmandu Valley three years later in 1768. However, an actual battle never took place to conquer the Kathmandu valley; it was taken over by Prithvi Narayan and his troops without any effort, during Indra Jatra, a festival of Newars, when all the valley's citizens were celebrating the festival. This event marked the birth of the modern nation of Nepal.
In 1788 the Nepalese overran Sikkim and sent a punitive raid into Tibet. Kangra in northern India was also occupied by the Nepalese. In 1809, Ranjit Singh the ruler of the Sikh state in the Punjab, had intervened and drove the Nepalese army east of the Satluj river.
Statue of a Gurkha At its maximum extent,Kangara, across the Sutlej River in the west as well as further south into the Terai plains and north of the Himalayas than at present. A dispute and subsequent war with Tibet over the control of mountain passes forced the Nepalese to retreat and pay heavy reparations to China.
Rivalry between Nepal and the British East India Company over the annexation of minor states bordering Nepal eventually led to the Anglo-Nepalese War (1815–16). At first the British underestimated the Nepalese and were badly defeated until committing more military resources than they had anticipated needing. They were greatly impressed by the valor and competence of their adversaries. Thus began the reputation of "Gurkhas" as fierce and ruthless soldiers. The war ended in the Treaty of Sugauli, under which Nepal ceded recently captured portions of Sikkim and lands in Terai as well as the right to recruit soldiers.
Factionalism inside the royal family had led to a period of instability. In 1846 a plot was discovered revealing that the reigning queen had planned to overthrow Jung Bahadur Rana, a fast-rising military leader. This led to the Kot Massacre; armed clashes between military personnel and administrators loyal to the queen led to the execution of several hundred princes and chieftains around the country. Jung Bahadur Rana emerged victorious and founded the Rana lineage.
The king was made a titular figure, and the post of Prime Minister was made powerful and hereditary. The Ranas were staunchly pro-British and assisted them during the Indian Sepoy Rebellion in 1857 (and later in both World Wars). Some parts of the Terai Region were given back to Nepal by the British as a friendly gesture, because of her military help to sustain British control in India during the Sepoy Rebellion. In 1923, the United Kingdom and Nepal formally signed an agreement of friendship, in which Nepal's independence was recognized by the UK.
Nepalese royalty in the 1920sSlavery was abolished in Nepal in 1924.
In the late 1940s, newly emerging pro-democracy movements and political parties in Nepal were critical of the Rana autocracy. Meanwhile, with the assertion of Chinese control in Tibet in the 1950s, India sought to counterbalance the perceived military threat from its northern neighbour by taking pre-emptive steps to assert more influence in Nepal. India sponsored both King Tribhuvan (ruled 1911-55) as Nepal's new ruler in 1951 and a new government, mostly comprising the Nepali Congress Party, thus terminating Rana hegemony in the kingdom.
.