The coming of Islam to Mindanao could be traced to the trading of Arab Merchants from the Arabian Peninsula passing thru Malaysia, Borneo and Sulu onward to the Visayas and Luzon and ultimately to China. This trade route existed in the later part of the tenth century and historians called it the second route, with the first route being from Malaysia passing thru the coast of Indo-China then to the shores of China.
Trade of Arab merchants to China using the first route was recorded as early as the beginning of the ninth century. According to Majul, it is generally argued that at this time Arab merchants and sailors and other Muslims had begun to dominate the Nanhai or Southeast Asia Trade.
This trade led to the Islamization of Malaysia, which gained momentum sometime after 878 C.E. when the Chinese rebel leader Huang Ch’ao drove out foreign merchants in Canton, China at a time when the Tang Dynasty was racked by a general political deterioration that led to its downfall. As a result, the Arab merchants were forced to settle in Kalah in the Malay Peninsula. This seaport then became the major intrepot of the Arab trade. It is this event of 878 that led the merchants to trade with other parts of Southeast Asia like Java, Borneo, Sulu and other parts of the Philippine archipelago.
By the second half of the tenth century, traders were welcomed again to China and it is during this period that the second trade route had been used by Arab and Muslim traders. In 977, Borneo begun to be known to Muslim traders when Pu-Ni (Brunei) sent an embassy to China headed by a certain P’u Ali (Abu Ali). Earlier, in the same year, a Chinese merchant named P’u Lu-hsieh arrived in the mouth of the river of Pu-Ni. According to Majul, if this is about the earliest time that the Muslim traders became acquainted with Borneo, it can be presumed that it would not be long after that they would come to know about or even pass by Sulu. According to Chinese sources, in the year 982 a ship with valuable merchandise from Ma-i (an island in the Philippine archipelago) arrived in Canton. This is the first actual recorded mention of the Philippine archipelago in Chinese written history (as so far available) as far as Arab trade route between China and the Southeast Asia is concerned. It is assumed then that this ship had passed by Borneo and Sulu.