Manila (/məˈnɪlə/ mə-NIL-ə; Filipino: Maynila, .mw-parser-output .IPA-label-small{font-size:85%}.mw-parser-output .references .IPA-label-small,.mw-parser-output .infobox .IPA-label-small,.mw-parser-output .navbox .IPA-label-small{font-size:100%}pronounced [maɪˈnilɐʔ]), officially the City of Manila (Filipino: Lungsod ng Maynila [lʊŋˈsod nɐŋ maɪˈnilɐʔ]), is the capital and second-most populous city of the Philippines, after Quezon City. Located on the eastern shore of Manila Bay on the island of Luzon, it is classified as a highly urbanized city. Manila is the world's most densely populated city proper,[5][6] with 71,263 inhabitants per square kilometer (184,570/sq mi) and a population of 1,846,513 people in 2020;[5] it is also the historic core of a built-up area that extends well beyond its administrative limits. Manila was the first chartered city in the country, designated by Philippine Commission Act No. 183 on July 31, 1901. It became autonomous with the passage of Republic Act No. 409, "The Revised Charter of the City of Manila", on June 18, 1949.[10] Manila is considered to be part of the world's original set of global cities because its commercial networks were the first to extend across the Pacific Ocean and connect Asia with the Spanish Americas through the galleon trade. This marked the first time an uninterrupted chain of trade routes circling the planet had been established.[11][12] By 1258, a Tagalog-fortified polity called Maynila existed on the site of modern Manila. On June 24, 1571, after the defeat of the polity's last indigenous ruler, Rajah Sulayman, in the Battle of Bangkusay, Spanish conquistador Miguel López de Legazpi began constructing the walled fortification of Intramuros on the ruins of an older settlement from whose name the Spanish and English name Manila derives. Manila was used as the capital of the captaincy general of the Spanish East Indies, which included the Marianas, Guam, and other islands, and was controlled and administered for the Spanish crown by Mexico City in the Viceroyalty of New Spain.