The history 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 and maritime-oriented harbor principalities which eventually grew into kingdoms, rajahnates, kedatuans, wangdoms 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 kingdoms of Namayan and Maynila, the Kedatuans of Madja-as and Dapitan, the nation of Ma-i, the sinified Wangdom of Pangasinan, as well as the 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.