In the mid-18th century, Sikkim was invaded by Nepal (then the Gorkha Kingdom) and was under the Gorkha rule for more than 40 years. Between 1775 and 1815, almost 180,000 ethnic Nepalis from Eastern and Central Nepal migrated to Sikkim. After the British colonisation of India, however, Sikkim allied itself with British India as they had a common enemy – Nepal. The infuriated Nepalese attacked Sikkim with vengeance, overrunning most of the region including the Terai. This prompted the British East India Company to attack Nepal in 1814, resulting in the Anglo-Nepalese War. The Sugauli Treaty between Britain and Nepal and the Treaty of Titalia between Sikkim and British India resulted in territorial concessions by Nepal, which ceded Sikkim to British India.
British and Indian protectorate
Under the 1861 Treaty of Tumlong Sikkim became a British protectorate, then an Indian protectorate in 1950.
Annexation by India
In 1975, allegations of discrimination against Nepali Hindus in Sikkim lead to resentment against the Chogyal. Their instigation led to Indian Army personnel moving into Gangtok. According to Sunanda K. Datta-Ray of The Statesman, the army killed the palace guards and surrounded the palace in April 1975.
After disarming the palace, a referendum on the monarchy was held, in which the Sikkimese people overwhelmingly voted to abolish the monarchy, and the new parliament of Sikkim, led by Kazi Lhendup Dorjee, proposed a bill for Sikkim to become an Indian state, which was promptly accepted by the Government of India.