The Philippines (Filipino: Pilipinas), officially known as the Republic of the Philippines, is an archipelagic country located in Southeast Asia with Manila as its capital city. The Philippine archipelago comprises 7,107 islands in the western Pacific Ocean, sharing maritime borders with Indonesia, Malaysia, Palau, the Republic of China and Vietnam. The Philippines is the worldâ¿¿s 12th most populous country with a population approaching 90 million people. Archeological and paleontological discoveries show that Homo sapiens existed in Palawan circa 50,000 BC. It was settled mostly by Malayo-Polynesian-speaking peoples and had cultural ties with Malaysia, Indonesia, India in ancient times, and trade relations with China and Japan as early as the 9th century. It was ruled as a territory of New Spain from 1565 to 1821, but after Mexican independence it was administered directly from Madrid. The Katipunan led the Philippine Revolution of 1896 that won independence from Spain. It became an American territory at the beginning of the 20th century, and gained its independence on July 4, 1946 after the Pacific War.