Manila (ə/; Filipino: Maynilà, pronounced [majˈnilaʔ] or [majniˈla]), officially the City of Manila (Filipino: Lungsod ng Maynilà[luŋˈsod nɐŋ majˈnilaʔ]), is the capital of the Philippines. It is one of the oldest cities in the world, as well as the most densely populated city proper in the world as of 2018. It was the first chartered city by virtue of the Philippine Commission Act 183 on July 31, 1901 and gained autonomy with the passage of Republic Act No. 409 or the "Revised Charter of the City of Manila" on June 18, 1949. Manila, alongside Mexico City and Madrid are considered the world's original set of Global Cities due to Manila's commercial networks being the first to traverse the Pacific Ocean, thus connecting Asia with the Spanish Americas, marking the first time in world history when an uninterrupted chain of trade routes circled the planet. Manila has been damaged by and rebuilt from wars more times than the famed city of Troy and it is also the second most natural disaster-afflicted capital city in the world next to Tokyo, yet it is simultaneously among the most populous and wealthiest cities in Southeast Asia.
Maynilà, the Filipino name for the city, comes from the phrase may-nilà, which translates to "where indigo is found."Nilà is derived from the Sanskrit word nīla (नील) which refers to indigo, and, by extension, to several plant species from which this natural dye can be extracted. The Maynilà name is more likely in reference to the presence of indigo-yielding plants growing in the area surrounding the settlement, rather than Maynilà being known as a settlement that trades in indigo dye. This is because the settlement was founded several hundred years before indigo dye extraction became an important economic activity in the area in the 18th century. The native Tagalog name for the indigo plant, tayum (or variations thereof) actually finds use in another toponym within the Manila area — Tayuman ("where the indigo [plant] is") — and elsewhere in the Philippines (e.g., Tayum, Abra; Tagum, Davao del Norte).
Maynilà was eventually adopted into Spanish as Manila.
An antiquarian and inaccurate etymology asserts the origin of the city's name as may-nilad ("where nilad is found"). Here, nilad is taken to be the name for one of two littoral plant species:
popularly, but incorrectly: the water hyacinth (Eichhornia crassipes) which still grows on the banks of the Pasig River to this day. However, it is a recent introduction to the Philippines from South America and therefore could not have been the plant species referred to in the toponym.
From a linguistic perspective it is unlikely for native Tagalog speakers to completely drop the final consonant /d/ in nilad to arrive at the present form Maynilà. As an example, nearby Bacoor still retains the final consonant of the old Tagalog word bakoód ("elevated piece of land"), even in old Spanish renderings of the placename (e.g., Vacol, Bacor). Historians Ambeth Ocampo and Joseph Baumgartner have also found that in all early documents, the place had always been written without the final /d/, thereby making the may-nilad etymology spurious.