The Gorkha control reached its height when the North Indian territories of the Kumaon and Garhwal Kingdoms in the west to Sikkim in the east came under Nepalese control. A dispute with Tibet over the control of mountain passes and inner Tingri valleys of Tibet forced the Qing Emperor of China to start the Sino-Nepali War compelling the Nepali to retreat to their own borders in the north. The rivalry between the Kingdom of Nepal and the East India Company over the control of states bordering Nepal eventually led to the Anglo-Nepali War (1815–16). At first, the British underestimated the Nepali and were soundly defeated until committing more military resources than they had anticipated needing. Thus began the reputation of Gurkhas as fierce and ruthless soldiers. The war ended in the Sugauli Treaty, under which Nepal ceded recently captured lands.