By the medieval period, the region was consolidated under the Garhwal Kingdom in the west and the Kumaon Kingdom in the east. During this period, learning and new forms of painting (the Pahari school of art) developed. Modern-day Garhwal was likewise unified under the rule of Parmars who, along with many Brahmins and Rajputs, also arrived from the plains. In 1791, the expanding Gorkha Empire of Nepal overran Almora, the seat of the Kumaon Kingdom. It was annexed to the Kingdom of Nepal by Amar Singh Thapa. In 1803, the Garhwal Kingdom also fell to the Gurkhas. After the Anglo-Nepalese War, this region was ceded to the British as part of the Treaty of Sugauli and the erstwhile Kumaon Kingdom along with the eastern region of Garhwal Kingdom was merged with the Ceded and Conquered Provinces. In 1816, the Garhwal Kingdom was re-established from a smaller region in Tehri as a princely state.