Manila is located on the eastern shores of Manila Bay and is bordered by Navotas and Caloocan to the north, Quezon City to the northeast, San Juan and Mandaluyong to the east, Makati on the southeast, and Pasay to the south.
Manila has a total population of more than 1,660,714 according to the 2007 census. Manila is the second most populous city in the Philippines behind Quezon City. The populace inhabit an area of only 38.55 square kilometers, making Manila the most densely populated city in the world.
Metro Manila is the most populous metropolitan area in the Philippines and the 11th in the world with an estimated population of 16,300,000. The greater urban area is the fifth-largest in the world and has an estimated metropolitan population of 20,654,307 people.
The city is divided into six legislative districts and consists of sixteen geographical districts: Binondo, Ermita, Intramuros, Malate, Paco, Pandacan, Port Area, Quiapo, Sampaloc, San Andres, San Miguel, San Nicolas, Santa Ana, Santa Cruz, Santa Mesa and Tondo. Within their precincts can be found areas of bustling commerce and some of the most historically and culturally significant iconic landmarks in the country as well as the seat of the executive and judicial branches of the government. It is home to many scientific and educational institutions, as well as numerous sport facilities. These make the city a major political, commercial, cosmopolitan, cultural, educational, religious, and transportation center of the Philippines.
The earliest written account of the city is the 10th-century Laguna Copperplate Inscription which describe an Indianized kingdom maintaining diplomatic relations with the Kingdom of Medang and commercial exchanges with Ancient Japan and Song Dynasty China. The city was invaded by Brunei's Sultan Bolkiah and was already Islamized by the 15th century when the Spanish first arrived. Manila eventually became the center of Spanish activity in the Far East and one end of the Manila � Acapulco galleon trade route linking Latin America and Asia. This caused it to be called the "Pearl of the Orient". Several Chinese insurrections, local revolts, a British Occupation and a Sepoy mutiny also occurred thereafter. Later, it saw the rise of the Philippine Revolution which was followed by the arrival of the Americans who made contributions to the city's urban planning and development only to have most of those improvements lost in the devastation of World War II. Since then the city has been rebuilt.