Modern Nepal was created in the latter half of the eighteenth century when Prithwi Narayan Shah, the ruler of the small principality of Gorkha , united a number of independent hill states to form the Gorkha Kingdom. He conquered the Kathmanduvalley in 1768.After Shah's death ,the Shah dynasty began to expand into India.
Hindu temples in Patan, the capital of one of the three medieval kingdoms
Between 1781 and 1791, Nepal invaded Tibet and robbed the Tashilhunpo Monastery. Alarmed, the chinese emperor Qianlong dispatched a sizeable army which forced the Nepalese to retreat
and pay heavy reparations. After 1800, the heirs of Prithwi Narayan Shah were unable to maintain political control, an a period of internal turmoil followed.
Inview of the Anglo-Nepalese war (1815-1816) Nepal lost some territories west of the Kali River, including the present day Uttarakhand state and several Punjab hills states. The treaty of Sugauli ceded parts of the Terai and Sikkim to the companyin exchange for Nepalese autonomy.