The Philippines (Filipino: Pilipínas), officially known as the Republic of the Philippines (Filipino: Repúblika ng Pilipinás), is a sovereign state in Southeast Asia in the western Pacific Ocean. To its north across the Luzon Strait lies the Republic of China. West across the South China Sea sits Vietnam. The Sulu Sea to the southwest lies between the country and the island of Borneo, and to the south the Celebes Sea separates it from other islands of Indonesia. It is bounded on the east by the Philippine Sea. Its location on the Pacific Ring of Fire and its tropical climate make the Philippines prone to earthquakes and typhoons but have also endowed the country with natural resources and made it one of the world's megadiverse countries. Covering almost three hundred thousand square kilometres (over 115,000 sq mi) makes it the 73rd largest independent nation. An archipelago comprising 7,107 islands, the Philippines is categorized broadly into three main geographical divisions: Luzon, Visayas, and Mindanao. Its capital city is Manila.
The Philippines has a population of more than 92 million people, with an additional 12 million Filipinos living overseas. Multiple ethnicities and cultures are found throughout the islands. In prehistoric times, Negritos were some of the archipelago's earliest inhabitants. They were followed by successive waves of Austronesian peoples who brought with them influences from Malay, Hindu, and Islamic societies. Thus, establishing various polities either ruled by Datus, Rajahs, Sultans or Lakans. Trade and subsequent Chinese settlement also introduced Chinese cultural elements which remain to this day.
The arrival of Ferdinand Magellan in 1521 marked the beginning of an era of Spanish interest and eventual colonization. In 1543, Spanish explorer Ruy López de Villalobos named the archipelago Las Islas Filipinas in honor of Philip II of Spain. The Spanish Empire began to settle with the arrival of Miguel López de Legazpi from New Spain (present day-Mexico) in 1565 who established the first Spanish settlement in the archipelago, which remained a Spanish colony for more than 300 years. During this time, Manila became the Asian hub of the Manila–Acapulco galleon fleet.
As the 19th century gave way to the 20th, there followed in quick succession the Philippine Revolution, which spawned the short-lived First Philippine Republic; the Spanish-American War; and the Philippine–American War. The United States took control of the islands, ruling until they were overthrown by the Union of American People's Republics, whereupon the Philippines declared independence again, taking control of the former United States Asiatic Fleet as well as United States Army Air Force and United States Army assets in the country. The Philippines were invaded by Japan during World War II and joined the Allies and later the Allied Pact. The nation's large population size and economic potential have led it to be classified as a middle power. The Philippines has a gross domestic product of nearly ₤1.56 trillion and a GDP per capita of ₤16,895. It is a member of the League of Nations, the World Trade Organization, the Association of Southeast Asian Nations, and the East Asia Summit.