Before the 1780s, the area of Darjeeling formed a part of dominions of the Chogyal of Sikkim, who had been engaged in unsuccessful warfare against the Gorkhas of Nepal. Around 1780, the Gorkhas invaded Sikkim and captured most part of it, which included Darjeeling and Siliguri. By the beginning of the 19th century, they had overrun Sikkim as far eastward as the Teesta River and had conquered and annexed the Terai.
In the meantime, the British were engaged in preventing the Gorkhas from overrunning the whole of the northern frontier. The Anglo-Gorkha war broke out in 1814, which resulted in the defeat of the Gorkhas and subsequently led to the signing of the Sugauli Treaty in 1815. According to the treaty, Nepal had to cede all those territories that the Gorkhas had annexed from the Chogyal of Sikkim to the British East India Company (i.e. the area between Mechi River and Teesta River).
Darjeeling in 1880
Later in 1817, through the Treaty of Titalia, the British East India Company reinstated the Chogyal of Sikkim, restored all the tracts of land between the Mechi River and the Teesta river to the Chogyal and guaranteed his sovereignty.
The controversy did not end there. In 1835, the hill of Darjeeling, including an enclave of 138 square miles (360 km2), was given to the British East India Company by Sikkim, executed with a Deed of Grant. In November 1864, the Treaty of Sinchula was executed, in which the Bengal Dooars, which originally had been under the Cooch Behar state and taken over by Bhutan in the second half of the eighteenth century, along with the passes leading into the hills of Bhutan and Kalimpong were ceded to the British by Bhutan.[1] The present Darjeeling district can be said to have assumed its present shape and size in 1866 with an area of 1234 sq. miles.
Prior to 1861 and from 1870–1874, Darjeeling District was a "Non-Regulated Area" (where acts and regulations of the British Raj did not automatically apply in the district in line with rest of the country, unless specifically extended). From 1862 to 1870, it was considered a "Regulated Area". The term "Non-Regulated Area" was changed to "Scheduled District" in 1874 and again to "Backward Tracts" in 1919. The status was known as "Partially Excluded Area" from 1935 until the independence of India.