The prehistory of the Philippines is believed to have begun with the arrival of the first humans using rafts or boats at least 67,000 years ago as the 2007 discovery of Callao Man suggested. Negrito tribes first inhabited the isles. Groups of Austronesians later migrated to the islands.
Eventually various groups developed, separated into hunter-gatherer tribes, warrior societies, petty plutocracies and maritime-oriented harbor principalities which eventually grew into kingdoms, rajahnates, kedatuans, huangdoms and sultanates. These small nations were either greatly influenced by the Indian Hindu religion, language, culture, literature and philosophy from India through many campaigns from India including South-East Asia campaign of Rajendra Chola I, Islam from Arabia or were Sinified tributary states allied to China. The nations included the Indianized Rajahnates of Butuan and Cebu, the dynasty of Tondo, the august kingdoms of Maysapan and Maynila, the Kedatuan of Madja-as, the sinified Huangdom of Ma-i, the Huangdom of Pangasinan as well as the Muslim Sultanates of Sulu, Lanao and Maguindanao. 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.