<P> Scholars generally believe that these 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 Maynila, Tondo, Pangasinan, Cebu, Panay, Bohol, Butuan, Cotabato, Lanao, and Sulu as well as some polities, such as Ma - i, whose possibly location are still the subject of debate among scholars . </P> <P> These polities were either influenced by the Hindu - Buddhist Indian religion, language, culture, literature and philosophy from India through many campaigns from India including the South - East Asia campaign of Rajendra Chola I, Islam from Arabia or 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 between being part of or being influenced by larger Asian empires like the Ming Dynasty, Majapahit and Brunei or rebelling and waging war against them . </P> <P> The first recorded visit by Europeans is the arrival of Ferdinand Magellan . He sighted Samar Island on March 16, 1521 and landed the next day on Homonhon Island, now part of Guiuan, Eastern Samar . Spanish colonization began with the arrival of Miguel López de Legazpi's expedition on February 13, 1565 from Mexico . He established the first permanent settlement in Cebu . Much of the archipelago came under Spanish rule, creating the first unified political structure known as the Philippines . Spanish colonial rule saw the introduction of Christianity, the code of law and the oldest modern university in Asia . The Philippines was ruled under the Mexico - based Viceroyalty of New Spain . After which, the colony was directly governed by Spain . </P> <P> Spanish rule ended in 1898 with Spain's defeat in the Spanish--American War . The Philippines then became a territory of the United States . U.S forces suppressed a Philippine Revolution led by Emilio Aguinaldo . The United States established the Insular Government to rule the Philippines . In 1907, the elected Philippine Assembly was set up with popular elections . The U.S. promised independence in the Jones Act . The Philippine Commonwealth was established in 1935, as a 10 - year interim step prior to full independence . However, in 1942 during World War II, Japan occupied the Philippines . The U.S. military overpowered the Japanese in 1945 . The Treaty of Manila in 1946 established an independent Philippine Republic . </P>

Who were the first european to reach the philippines
find me the text answering this question