Lupah Sug

In the Philippine history, the Lupah Sug (Jawi:) was a predecessor state before the establishment of Sultanate of Sulu.

Hindu principality of Maimbung
Sulu that time was called Lupah Sug and ruled by the Indianised Hindu principality of Maimbung, populated by Buranun people (or Budanon, literally means "mountain-dwellers"), was first ruled by a certain rajah who assumed the title Rajah Sipad the Older. According to Majul, the origins of the title rajah sipad originated from the Hindu sri pada, which symbolises authority. The Principality was instituted and governed using the system of rajahs. Sipad the Older was succeeded by Sipad the Younger.

Pre-Islamic social structure of the Hindu principality
Prior to the establishment of the sultanate, the Tausug lived in communities called a banwa. Each banwa was headed by a leader known as a panglima along with a healer called a mangungubat. The panglima was usually a man with a strong political and physical leadership among the community. A healer could be either a man and woman, and they specialized in contacting the spiritual realm. The healers were also exempted from practicing traditional marriage as they frequently had sensual relationships with the same sex, a common trait in numerous tribes throughout the Philippines archipelago and northern Borneo in pre-Islamic and pre-Christian times. Each banwa was considered an independent state, the same with the city-states of other regions in Asia. The Tausug during the era had trade relations with other neighboring Tausug banwas, the Digap of Malay, the Yakan of Basilan, and the nomadic Sama-Bajau.

Customs of people up to the arrival of Tuan Mashā′ikha
During the reign of Sipad the Younger, a mystic named Tuan Mashā′ikha arrived in Jolo in 1280 AD. Little is known of the origins and early biography of Tuan Mashā′ikha, except that he was a Muslim "who came from foreign lands" at the head of a fleet of Muslim traders, or he was brought into being from a stalk of bamboo and was considered a prophet, thus well respected by the people. Other reports, however, insisted that Tuan Mashā′ikha together with his parents, Jamiyun Kulisa and Indra Suga, were sent to Sulu by Alexander the Great (who is known as Iskandar Zulkarnain in Malay Annals). However, Saleeby dismisses this claim by concluding that Jamiyun Kulisa and Indra Suga were mythical names. According to tarsila, during the coming of Tuan Mashā′ikha, the people of Maimbung worshipped tombs and stones of any kind. After he preached Islam in the area, he married Sipad the Younger's daughter, Idda Indira Suga and bore three children: Tuan Hakim, Tuan Pam and 'Aisha. Tuan Hakim, in turn, begot five children. From the genealogy of Tuan Mashā′ikha, another titular system of aristocracy called "tuanship" started in Sulu. Apart from the Idda Indira Suga, Tuan Mashā′ikha also married into another "unidentified woman" and begot Moumin. Tuan Mashā′ikha died in 710 A.H. (equivalent to 1310 AD), and was buried in Bud Dato near Jolo, with an inscription of Tuan Maqbālū.

Majapahit invasion and rebellion
A descendant of Tuan Mashā′ikha named Tuan May also begot a son named Datu Tka. The descendants of Tuan May did not assume the title tuan, instead, they started to use datu. It is the first time datu was used as a political institution. During the coming of Tuan Mashā′ikha, the Tagimaha people (literally means "the party of the people") coming from Basilan and several places in Mindanao, also arrived and settled in Buansa. After the Tagimaha came the Baklaya people (which means "seashore dwellers"), believed to be originated from Sulawesi, and settled in Patikul. After these came the Bajau people (or Samal) from Johor. The Bajau were accidentally driven towards Sulu by a heavy monsoon, some of them to the shores of Brunei and others to Mindanao. The population of Buranun, Tagimaha, and Baklaya in Sulu created three parties with distinct system of government and subjects. In the 1300s the Chinese annals, Nanhai zhi, reported that Brunei invaded or administered the Philippine kingdoms of Butuan, Sulu and Ma-i (Mindoro) which would regain their independence at a later date. According to the Nagarakretagama, the Majapahit Empire under Emperor Hayam Wuruk, invaded Sulu at year 1365. However, in 1369, the Sulus rebelled and regained independence and in vengeance, assaulted the Majapahit Empire and its province Po-ni (Brunei), and had invaded the Northeast Coast of Borneo and thereafter went to the capital, looting it of treasure and gold. In the sacking of Brunei, the Sulus had stolen 2 sacred pearls from the Bruneian king. A fleet from the Majapahit capital succeeded in driving away the Sulus, but Po-ni was left weaker after the attack. Since Chinese historiographies later recorded there to be a Maharaja of Sulu, it is assumed that it was unable to be reconquered by Majapahit and it was a rival to that state. By 1390 AD, Rajah Baguinda Ali, a prince of the Pagaruyung Kingdom arrived at Sulu and married into the local nobility. At least in 1417, when Sulu rivaled Majapahit, according to Chinese annals, three kings (or monarchs) ruled three civilised kingdoms in the island. Patuka Pahala (Paduka Batara) ruled the eastern kingdom (The Sulu Archipelago), he was the most powerful; the west kingdom was ruled by Mahalachi (Maharajah Kamal ud-Din) (Ruler of Kalimantan in Indonesia); and the kingdom near the cave (or Cave King) was Paduka Patulapok (From Palawan Island). The Bajau settlers were distributed among the three kingdoms. During this time, Sulu had avenged itself from Majapahit Imperialism by encroaching upon the Majapahit Empire as the alliance of the 3 Sulu kings had territory that reached Kalimantan, specifically East and North Kalimantan, which were former Majapahit provinces.

Moumin's descendants, the son of Tuan Mashā′ikha populated Sulu. After some time, a certain Timway Orangkaya Su'il was mentioned by the second page of tarsila, that he received four Bisaya slaves (People from the Kedatuan of Madja-as) from Manila (presumably Kingdom of Maynila) as a sign of friendship between the two countries. The descendants of Timway Orangkaya Su'il then inherited the title timway, which means "chief". On tarsila's third page, it accounts the fact that the slaves were the ancestors of the inhabitants in the island to Parang, Lati, Gi'tung, and Lu'uk respectively.

The fourth page then narrates the coming of the Buranun (addressed in the tarsila as "the Maimbung people") Tagimaha, Baklaya, then the drifted Bajau immigrants from Johor. The condition of Sulu before the arrival of Islam can be summarised as such: The island was inhabited by several cultures, and was reigned over by three independent kingdoms ruled by the Buranun, Tagimaha, and Baklaya peoples. Likewise, the socio-political systems of these kingdoms were characterised by several distinct institutions: rajahship, datuship, tuanship and timwayship. The arrival of Tuan Mashā′ikha afterwards established a core Islamic community in the island.

Establishment of Islamic Sultanate
The sultanate was founded on 17 November 1405. by the Johore-born explorer, Sunni Sufi religious scholar Sharif ul-Hashim. A scholar of the Ash'ari Aqeeda and Shafi'i Madh'hab. Paduka Mahasari Maulana al Sultan Sharif ul-Hashim became his full regnal name, Sharif-ul Hashim is his abbreviated name. He and his brothers and father were from the Ba Alawi Family of Yemen. He settled in Buansa, Sulu. After the marriage of Abu Bakr and a local dayang-dayang (princess) Paramisuli, he founded the sultanate. The Sultanate gained its independence from the Bruneian Empire in 1578.

Islamisation
At the end of the 14th century, an Arab Muslim scholar following the Ash'ari Aqeeda and Shafi'i Fiqh named Karim ul-Makhdum from Mecca arrived in the Malacca Sultanate. He preached Islam to the people, and thus many citizens, including the ruler of Malacca, converted to Islam. Chinese Muslims, Arabs, Persians, Malays, and Indian Muslims introduced Sulu and other Muslim sultanates to Islam. Chinese Muslim merchants participated in the local commerce, and the Sultanate had diplomatic relations with China during the time of the Ming dynasty (1368–1644), being involved in the tribute system. The Sulu leader Paduka Pahala and his sons moved to China, where he died, and Chinese Muslims brought up his sons in Dezhou, where their descendants live and have the surnames An and Wen.

In 1380 AD, The Sunni Sufi scholar Karim ul-Makhdum arrived in Simunul island from Malacca, again with Arab traders. Apart from being an Islamic preacher, he operated as a trader, some see him as a Sufi missionary originating from Mecca. He preached Islam in the area, and was thus accepted by the core Muslim community. He was the second person who preached Islam in the area, following Tuan Mashā′ikha. To facilitate easy conversion of nonbelievers, he established a mosque in Tubig-Indagan, Simunul, which became the first Islamic temple to be constructed in the area, as well as the first in the Philippines. This later became known as Sheik Karimal Makdum Mosque. He died in Sulu, though the exact location of his grave is unknown. In Buansa, he was known as Tuan Sharif Awliyā. On his alleged grave in Bud Agad, Jolo, an inscription was written as "Mohadum Aminullah Al-Nikad". In Lugus, he is referred to Abdurrahman. In Sibutu, he is known to as his name.

The dispute over the actual location of his grave stemmed from the fact that Karim ul-Makhdum traveled to several islands in Sulu Sea to preach Islam. In many places in the archipelago, he was beloved. It is said that the people of Tapul built a mosque honouring him and that they claim descent from Karim ul-Makhdum. Thus, the success of Karim ul-Makhdum of spreading Islam in Sulu threw a new light in Islamic history in the Philippines. The customs, beliefs and political laws of the people changed and customized to adopt the Islamic tradition.