Dadra and Nagar Haveli is a district of the union territory of Dadra and Nagar Haveli and Daman and Diu in western India. It is composed of two separate geographical entities: Nagar Haveli, wedged in between Maharashtra and Gujarat states to the north-west, the smaller enclave of Dadra, which is surrounded by Gujarat. Silvassa is the administrative headquarters of Dadra and Nagar Haveli. Unlike the surrounding areas, Dadra and Nagar Haveli was ruled by the Portuguese from 1783 until the mid-20th century. The area was captured by pro-India forces in 1954 and administered as the de facto state of Free Dadra and Nagar Haveli before being accessioned to India as a union territory, the union territory of Dadra and Nagar Haveli in 1961. The union territory was merged with the neighbouring union territory of Daman and Diu to form the new union territory of "Dadra and Nagar Haveli and Daman and Diu" on 26 January 2020. The territory of Dadra and Nagar Haveli then became one of the three districts of the new union territory, as the Dadra and Nagar Haveli district. The history of Dadra and Nagar Haveli begins with the defeat of the Koli chieftains of the region by the Rajput kings. In the year 1262 a Rajput prince from Rajasthan named Ram Singh established himself as the ruler of Ramnagar, the present-day Dharampur, which consisted of 8 parganas (a group of villages) and assumed the title Maharana. Nagar Haveli was one of the Parganas, and its capital was Silvassa. In 1360 Rana Dharamshah shifted his capital from Nagar Haveli to Nagar Fatehpur. With the rise of Maratha power, Shivaji Maharaj viewed Ramnagar as an important locality. He captured the region, but Somshah Rana recaptured it in 1690. After the Treaty of Vasai (6 May 1739), Vasai and the surrounding territories came under the Maratha rule. Soon after, the Marathas captured Ramnagar but reinstated the ruler, Ramdeo, under conditions. Thus the Marathas acquired the rights to collect revenue, known as chauthai. from Nagar Haveli and two other Parganas.