the 10th century, likely via the Hindu Majapahit empire. Writing systems Brahmic scripts influenced the use of the Kawi script and the creation of several native writing systems. The Laguna Copperplate Inscription was written using the Kawi script. Baybayin By the 13th or 14th century, the baybayin script was used for the Tagalog language. It spread to Luzon, Mindoro, Palawan, Panay and Leyte, but there is no proof it was used in Mindanao. There were at least three varieties of baybayin in the late 16th century. These are comparable to different variations of Latin which use slightly different sets of letters and spelling systems. In 1521, the chronicler Antonio Pigafetta from the expedition of Ferdinand Magellan noted that the people that they met in Visayas were not literate. However, in the next few decades the Baybayin script seemed to have been introduced to them. In 1567 Miguel López de Legaspi reported that "they [the Visayans] have their letters and characters like those of the Malays, from whom they learned them; they write them on bamboo bark and palm leaves with a pointed tool, but never is any ancient writing found among them nor word of their origin and arrival in these islands, their customs and rites being preserved by traditions handed down from father to son without any other record." Earliest documented Chinese contact The earliest date suggested for direct Chinese contact with the Philippines was 982. At the time, merchants from "Ma-i" (now thought to be either Bay, Laguna on the shores of Laguna de Bay, or a site called "Mait" in Mindoro) brought their wares to Guangzhou and Quanzhou. This was mentioned in the History of Song and Wenxian Tongkao by Ma Duanlin which were authored during the Yuan Dynasty. Arrival of Islam Beginnings Muslim traders introduced Islam to the then-Indianised Malayan empires around the time that wars over succession had ended in the Majapahit Empire in 1405. However, by 1380 Makhdum Karim had already brought Islam to the Philippine archipelago, establishing the Sheik Karimal Makdum Mosque in Simunul, Tawi-Tawi, the oldest mosque in the country. By the 15th century, Islam was established in the Sulu Archipelago and spread from there. Subsequent visits by Arab, Malay and Javanese missionaries helped spread Islam further in the islands. The Sultanate of Sulu once encompassed parts of modern-day Indonesia, Malaysia and the Philippines. Its royal house claims descent from Muhammad. Bruneian