During the life of Khedrup Gyatso, wars over Ladakh weakened the lamas' power over the Tibetan Plateau and the First and Second Opium Wars as well as the Taiping Rebellion simultaneously weakened Chinese influence on Tibet. In the last years of his reign the Nepalese invaded Tibet, but were defeated in the Nepalese-Tibetan War (1855–1856).