The history of Darjeeling is intertwined with that of Sikkim, Nepal, British India, and Bhutan. Until the early 19th century, the hilly area around Darjeeling was controlled by the Kingdom of Sikkim with the settlement consisting of a few villages of the Lepcha and Kirati people. The Chogyal of Sikkim had been engaged in unsuccessful warfare against the Gurkhas of Nepal. From 1780, the Gurkhas made several attempts to capture the entire region of Darjeeling. 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 and the entire area now belonged to Nepal. In the meantime, the British Army was engaged in preventing the Gorkhas from over-running the whole of the northern frontier. The Anglo-Nepalese War war broke out in 1814, which resulted in the defeat of the Gurkhas and subsequently led to the signing of the Sugauli Treaty in 1816. According to the treaty, Nepal had to cede all those territories annexed from the Chogyal of Sikkim to the British East India Company (i.e. the area between Mechi River and Teesta River). 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 River Mechi and the River Teesta to the Chogyal of Sikkim and guaranteed his sovereignty.In 1828, a delegation of the British East India Company (BEIC) officials on its way to the Nepal-Sikkim border stayed in Darjeeling and decided that the region was a suitable site for a sanatorium for British soldiers. The company negotiated a lease of the area west of the Mahananda River from the Chogyal of Sikkim in 1835. In 1849, the BEIC Superintendent Archibald Campbell and the explorer and botanist Joseph Dalton Hooker were imprisoned in the region by the Sikkim Chogyal. The BEIC sent a force to free them. Continued friction between the BEIC and the Sikkim authorities resulted in the annexation of 640 square miles (1,700 km2) of territory by the British in 1850. In 1864, the Bhutanese rulers and the British signed the Treaty of Sinchula that ceded the passes leading through the hills and Kalimpong to the British. Further discord between Sikkim and the British resulted in a war, culminating in the signing of a treaty and the annexation by the British of the area east of the Teesta River in 1865. By 1866, Darjeeling district had assumed its current shape and size, covering an area of 1,234 square miles (3,200 km2). During the British Raj, Darjeeling's temperate climate led to its development as a hill station for British residents seeking to escape the summer heat of the plains. The development of Darjeeling as a sanatorium and health resort proceeded briskly. Arthur Campbell, a surgeon with the Company, and Lieutenant Robert Napier were responsible for establishing a hill station there. Campbell's efforts to develop the station, attract immigrants to cultivate the slopes and stimulate trade resulted in a hundredfold increase in the population of Darjeeling between 1835 and 1849. The first road connecting the town with the plains was constructed between 1839 and 1842. In 1848, a military depot was set up for British soldiers, and the town became a municipality in 1850. Commercial cultivation of tea in the district began in 1856, and induced a number of British planters to settle there. Darjeeling became the formal summer capital of the Bengal Presidency after 1864. Scottish missionaries undertook the construction of schools and welfare centres for the British residents, laying the foundation for Darjeeling's notability as a centre of education. The opening of the Darjeeling Himalayan Railway in 1881 further hastened the development of the region. In 1899, Darjeeling was rocked by major landslides that caused severe damage to the town and the native population. Under the British Raj, the Darjeeling area was initially a "Non-Regulation District", a scheme of administration applicable to economically less advanced districts in the British India; acts and regulations of the British Raj did not automatically apply to the district in line with rest of the country. In 1919, the area was declared a "backward tract". During the Indian independence movement, the Non-cooperation movement spread through the tea estates of Darjeeling. There was also a failed assassination attempt by revolutionaries on John Anderson, the Governor of Bengal in 1934. Subsequently, during the 1940s, communist activists continued the nationalist movement against the British by mobilising the plantation workers and the peasants of the district. Socio-economic problems of the region that had not been addressed during British Raj continued to linger and were reflected in a representation made to the Constituent Assembly of India in 1947, which highlighted the issues of regional autonomy and Nepali nationality in Darjeeling and adjacent areas. After the independence of India in 1947, Darjeeling was merged with the state of West Bengal. A separate district of Darjeeling was established consisting of the hill towns of Darjeeling, Kurseong, Kalimpong and some parts of the Terai region. While the hill population comprised mainly ethnic Nepalis, the plains harboured a large ethnic Bengali population who were refugees from the Partition of India. A cautious and non-receptive response by the West Bengal government to most demands of the ethnic Nepali population led to increased calls, in the 1950s and 1960s, for Darjeeling's autonomy and for the recognition of the Nepali language; the state government acceded to the latter demand in 1961.The creation of a new state of Sikkim in 1975, along with the reluctance of the Government of India to recognise Nepali as an official language under the Constitution of India, brought the Gorkhaland movement to the forefront. Agitation for a separate state continued through the 1980s, included violent protests during the 1986–88 period. The agitation ceased only after an agreement between the government and the Gorkha National Liberation Front (GNLF), resulting in the establishment of an elected body in 1988 called the Darjeeling Gorkha Hill Council (DGHC), which received autonomy to govern the district. Though Darjeeling became peaceful, the issue of a separate state lingered, fuelled in part by the lack of comprehensive economic development in the region even after the formation of the DGHC. New protests erupted in 2008–09, but both the Union and State governments rejected Gorkha Janmukti Morcha's (GJM) demand for a separate state. In July 2011, a pact was signed between GJM, the Government of West Bengal and the Government of India which includes the formation of a new autonomous, elected Gorkhaland Territorial Administration (GTA), a hill council endowed with more powers than its predecessor Darjeeling Gorkha Hill Council.
Tourist inflow into Darjeeling had been affected by the political instability in the region, and agitations in the 1980s and 2000s hit the tourism industry hard. However, since 2012, Darjeeling has once again witnessed a steady inflow of both domestic and international tourists. Presently, around 50,000 foreign and 500,000 domestic tourists visit Darjeeling each year, and its repute as the "Queen of the Hills" remains unaltered. According to an India Today survey published on 23 December 2015, Darjeeling is the third most Googled travel destination among all the tourist destinations in India. Even though there are political instabilities in Darjeeling, its tourism rate is increasing year by year. Many visit this place for food specialities like momos, steamed stick rice, and other steamed foods famous in this region, as well as to see the natural beauty of the area.