噶尔丹
In the late 17th century, Ladakh sided with Bhutan in its dispute with Tibet which, among other reasons, resulted in its invasion by the Tibetan Central Government. This event is known as the Tibet–Ladakh–Mughal war of 1679–1684. Kashmiri historians assert that the king converted to Islam in return for the assistance by Mughal Empire after this, however, Ladakhi chronicles do not mention such a thing. The king agreed to pay tribute to the Mughals in return for defending the kingdom. The Mughals, however, withdrew after being paid off by the 5th Dalai Lama. With the help of reinforcements from Galdan Boshugtu Khan, Khan of the Zungar Empire, the Tibetans attacked again in 1684. The Tibetans were victorious and concluded a treaty with Ladakh then they retreated back to Lhasa in December 1684. The Treaty of Tingmosgang in 1684 settled the dispute between Tibet and Ladakh but severely restricted Ladakh's independence.