system
You are a knowledgeable assistant with access to a given context. Always provide responses that are relevant to the context provided.


user
Context: Chennai (/ˈtʃɛnaɪ/ (listen), Tamil: [ˈt͡ɕenːaɪ̯]), formerly known as Madras,[A] is the capital city of Tamil Nadu, the southernmost Indian state. It is the state's primate city both in area and population and is located on the Coromandel Coast of the Bay of Bengal. According to the 2011 Indian census, Chennai is the sixth-most populous city in India and forms the fourth-most populous urban agglomeration. The Greater Chennai Corporation is the civic body responsible for the city; it is the oldest city corporation of India, established in 1688—the second oldest in the world after London.

Historically, Chennai and surroundings were part of the Chola, Pandya, Pallava and Vijayanagara kingdoms for many centuries. The coastal land, which then contained the fishing village Madrasapattinam, was purchased by the British East India Company from the Nayak ruler Damarla Chennapa Nayaka, in the 17th century. The British garrison established the Madras city and port, and built Fort St. George—the first British fortress in India—which the French won over briefly in 1746, before becoming the winter capital of the Madras Presidency, a colonial province of the British Raj in the Indian subcontinent. After India gained its independence in 1947, Madras continued as the capital city of the Madras State and present-day Tamil Nadu. The city was officially renamed as Chennai in 1996.

The city is coterminous with Chennai district, which together with the adjoining suburbs constitutes the Chennai Metropolitan Area,[note 1] the 36th-largest urban area in the world by population and one of the largest metropolitan economies of India. As the traditional and de facto gateway of South India, Chennai is among the most-visited Indian cities by foreigners. It was ranked the 43rd most-visited city in the world in 2015 and 36th in 2019. The Quality of Living Survey rates it as India's safest city. Chennai attracts 45 percent of health tourists visiting India, and 30 to 40 percent of domestic health tourists. As such, it is termed "India's health capital". Chennai has the fifth-largest urban economy, and had the third-largest expatriate population in India.


Question: What were all the earlier names for the city presently known as Chennai?


assistant
Chennai traces its roots back to a fishing village called Madrasapattinam. The British officially named it Madras when they purchased the land in the 17th century. The name of the city was changed to Chennai in 1996.