The Philippines, officially the Republic of the Philippines, is an archipelagic country in Southeast Asia. In the western Pacific Ocean, it consists of 7,641 islands, with a total area of 300,000 square kilometers, which are broadly categorized in three main geographical divisions from north to south: Luzon, Visayas, and Mindanao. The Philippines is bounded by the South China Sea to the west, the Philippine Sea to the east, and the Celebes Sea to the south. It shares maritime borders with Taiwan to the north, Japan to the northeast, Palau to the east and southeast, Indonesia to the south, Malaysia to the southwest, Vietnam to the west, and China to the northwest. It is the world's twelfth-most-populous country, with diverse ethnicities and cultures. Manila is the country's capital, and its most populated city is Quezon City. Both are within Metro Manila.
Negritos, the archipelago's earliest inhabitants, were followed by waves of Austronesian peoples. The adoption of animism, Hinduism with Buddhist influence, and Islam established island-kingdoms ruled by datus, rajas, and sultans. Extensive overseas trade with neighbors such as the late Tang or Song empire brought Chinese people to the archipelago as well, which would also gradually settle in and intermix over the centuries.