At the beginning of the 18th century the bulk of this area was included in the domain of Fateh Shah, the Raja of Garhwal. He was followed by Dilip Sah, Upendra Sah and Pradeep Sah for over half a century. In the beginning of 1803 a severe earthquake occurred in the whole of Garhwal which destroyed many houses and killed many human beings and cattle. Soon after this the Gorkha leaders Amar Singh Thapa, Hastidal Chutariya and some others invaded Garhwal with a large and well equipped army. Amar Singh Thapa was appointed Governor of the region. The Gorkhas were defeated by the British forces in the Anglo-Nepalese War of 1814, and Gairsain along with other parts of Kumaon and Garhwal was ceded to the British in the Treaty of Sugauli. In 1839 the district of Garhwal came into existence after being separated from the Kumaon District. In 1919, this area came into prominence as a centre of political activity under the leadership of Anusuya Prasad Bahuguna, a leader who held public meetings against coolie-begar system. In 1930 the civil disobedience movement was made one occasion for launching individual Satyagraha against British Government. In 1947 the area along with rest of country won independence from British rule when it was part of the district British Garhwal also called Pauri Garhwal.