The history of the Philippines dates from the earliest hominin activity in the archipelago at least 709,000 years ago. Homo luzonensis, a species of archaic humans, was present on the island of Luzon at least 67,000 years ago. The earliest known anatomically modern human was from Tabon Caves in Palawan dating about 47,000 years. Negrito groups were the first inhabitants to settle in the prehistoric Philippines. By around 3000 BC, seafaring Austronesians, who form the majority of the current population, migrated southward from Taiwan.
Scholars generally believe that these ethnic and social groups eventually developed into various settlements or polities with varying degrees of economic specialization, social stratification, and political organization. Some of these settlements (mostly those located on major river deltas) achieved such a scale of social complexity that some scholars believe they should be considered early states. This includes the predecessors of modern-day population centers such as Manila, Tondo, Pangasinan, Cebu, Panay, Bohol, Butuan, Cotabato, Lanao, Zamboanga and Sulu as well as some polities, such as Ma-i, whose possible location is either Mindoro or Laguna.
These polities were influenced by Islamic, Indian, and Chinese cultures. Islam arrived from Arabia, while Indian Hindu-Buddhist religion, language, culture, literature and philosophy arrived through expeditions such as the South-East Asia campaign of Rajendra Chola I. Some polities were Sinified tributary states allied to China. These small maritime states flourished from the 1st millennium. These kingdoms traded with what are now called China, India, Japan, Thailand, Vietnam, and Indonesia. The remainder of the settlements were independent barangays allied with one of the larger states. These small states alternated from being part of or being influenced by larger Asian empires like the Ming dynasty, Majapahit and Brunei or rebelling and waging war against them.