In 1380 Karim ul’ Makhdum the first Arabian trader reached the Sulu Archipelago and Jolo in the Philippines and through trade throughout the island established Islam in the country. In 1390 the Minangkabau’s Prince Rajah Baguinda and his followers preached Islam on the islands. The Sheik Karimal Makdum Mosque was the first mosque established in the Philippines on Simunul in Mindanao in the 14th century. Subsequent settlements by Arab missionaries traveling to Malaysia and Indonesia helped strengthen Islam in the Philippines and each settlement was governed by a Datu, Rajah and a Sultan. Islam was introduced by Chinese Muslims, Indian Muslims, and Persians. Islamic provinces founded in the Philippines included the Sultanate of Maguindanao, Sultanate of Sulu, Sultanate of Lanao and other parts of the southern Philippines.
When the Spanish fleet led by Miguel López de Legazpi arrived in the Philippines in 1565, they were met by local datus as they traveled in the islands. Arriving in the Kingdom of Maynila, a vassal-state of the Sultanate of Brunei, in 1570 they were met by the Muslim rajah, Rajah Sulaiman III.
By the next century conquests had reached the Sulu islands in the southern tip of the Philippines where the population was Buddhist and Hindu and they took up the task of converting the animistic population to Islam with renewed zeal. By the 15th century, half of Luzon (Northern Philippines) and the islands of Mindanao in the south had become subject to the various Muslim sultanates of Borneo and much of the population in the almost of South were converted to Islam. However, the Visayas was largely dominated by Hindu-Buddhist societies led by rajahs and datus who strongly resisted Islam. One reason could be due to the economic and political disasters prehispanic Muslim pirates from the Mindanao region bring during raids. These frequent attacks gave way to naming present-day Cebu as then-Sugbo or scorched earth which was a defensive technique implemented by the Visayans so the pirates have nothing much to loot.