# Demak Sultanate

Part of a series on the :
History of Indonesia :
Timeline :
Prehistory Paleolithic Java Man 1,000,000 BP Flores Man 94,000–12,000 BP Neolithic Toba catastrophe 75,000 BP Buni culture 400 BCE–500 CE :
Hindu and Buddhist kingdoms Kutai Kingdom 350–1605 Tarumanagara Kingdom 400s–500s Kantoli Kingdom 400s–500s Kalingga Kingdom 500s–600s Melayu Kingdom 600s–1347 Srivijaya Empire 600s–1025 Shailendra Dynasty 600s–900s Mataram Kingdom 716–1016 Bali Kingdom 914–1908 Sunda Kingdom 932–1579 Kahuripan Kingdom 1019–1045 Kediri Kingdom 1045–1221 Dharmasraya Kingdom 1183–1347 Pannai Kingdom 1000s–1300s Singhasari Empire 1222–1292 Majapahit Empire 1293–1527 :
Islamic sultanates Spread of Islam 800–1600 Peureulak Sultanate 840–1292 Aru Kingdom 1225–1613 Ternate Sultanate 1257–1914 Samudera Pasai Sultanate 1267–1521 Pagaruyung Kingdom 1347–1833 Bruneian Empire 1368–1888 Malacca Sultanate 1400–1511 Sultanate of Sulu 1405–1851 Sultanate of Cirebon 1445–1677 Demak Sultanate 1475–1554 Aceh Sultanate 1496–1903 Sultanate of Ternate 1486–1914 Sultanate of Bacan 1515–1946 Sultanate of Tidore 1500s–1967 Sultanate of Jailolo 1496–1903 Banten Sultanate 1526–present Banjar Sultanate 1526–1863 Kalinyamat Sultanate 1527–1599 Mataram Sultanate 1586–1755 Johor Sultanate 1528s–1877 Kingdom of Kaimana 1600s–1926 Jambi Sultanate 1604s–1904 Palembang Sultanate 1659–1823 Siak Sultanate 1725–1946 Surakarta Sunanate 1745–present Yogyakarta Sultanate 1755–present Deli Sultanate 1814–1946 Riau-Lingga Sultanate 1824–1911 :
Christian kingdoms Kingdom of Larantuka 1515–1904 Kingdom of Siau 1510–1956 Kingdom of Bolaang Mongondow 1670–1950 :
Chinese Kongsi federations Heshun Confederation 1776–1854 Lanfang Republic 1777–1884 Santiaogou Republic 1777–1853 :
European colonization Portuguese Insulindia 1512–1850 Spanish East Indies 1521–1677 Dutch East India Company rule 1602–1799 British Bencoolen 1685–1824 French and British interregnum 1806–1816 Dutch East Indies 1800–1942 1945–1949 :
Emergence of Indonesia National Awakening 1908–1942 Japanese occupation 1942–1945 National Revolution 1945–1949 United States of Indonesia 1949–1950 :
Republic of Indonesia Liberal democracy 1950–1959 Guided Democracy 1959–1966 Transition 1966–1967 New Order 1967–1998 Reformasi 1998–present :
Regions
Jakarta
Bali
Bogor
Bandung :
By topic
Agriculture
Archaeology
Currency
Economy
Education
Javanese historical texts
Religion
Buddhism
Christianity
Hinduism
Islam
Judaism
Mass media
Military
Sport
Women :
Indonesia portal :
vte :
The Demak Sultanate (کسلطانن دمق‎) was a Javanese Muslim state located on Java's north coast in Indonesia, at the site of the present-day city of Demak. A port fief to the Hindu-Buddhist Majapahit kingdom thought to have been founded in the last quarter of the 15th century, it was influenced by Islam brought by Muslim traders from China, Gujarat, Arabia and also Islamic kingdoms in the region, such as Samudra Pasai, Malacca and Bani (Muslim) Champa. The sultanate was the first Muslim state in Java, and once dominated most of the northern coast of Java and southern Sumatra.
Although it lasted only a little more than a century, the sultanate played an important role in the establishment of Islam in Indonesia, especially on Java and neighboring areas.

## Etymology

The origin of Demak was the settlement named Glagah Wangi. According to tradition, the first person that Raden Patah encountered in Glagah Wangi was a woman named Nyai Lembah, from Rawa Pening. Nyai Lembah invited Raden Patah to settle in Glagah Wangi, which later was renamed as Demak Bintara.
There are several suggestions on the origin of the name Demak. According to Indonesian historian Poerbatjaraka, it derived from the Javanese term delemak, which means "watery soil" or "swamp". According to Hamka, it derived from the Arabic term dimak, which means "tears", to imply the hardship endured during the struggle to establish Islam in Java. According to another historian, Sutjipto Wiryosuparto, it derived from a term in the Kawi language that means "heirloom" or "gift".$^{:14}$

## History
### Formation

During the reign of Wikramawardhana of Majapahit, during the period from 1405 to 1433, a series of Ming armadas naval expeditions led by Zheng He,$^{:241–242}$ a Muslim Chinese admiral, arrived in Java. This Chinese expedition supported the establishment of the Muslim state of Malacca in the first half of the 15th century, later assisted by the establishment of Muslim Chinese, Arab and Malay communities in northern ports of Java such as Semarang, Demak, Tuban, and Ampel; thus Islam began to gain a foothold on the northern coast of Java.
Demak's origins are uncertain although it was apparently founded in the last quarter of the 15th century by a Muslim known as Raden Patah (from the Arabic name Fatah, also called "Pate Rodin" in Portuguese records, and "Jin Bun" in Chinese records). There is evidence that he had Chinese ancestry and perhaps was named Cek Ko-po.
According to tradition, Sunan Ampel ordered Raden Patah to establish an Islamic learning center in the Glagah Wangi village in coastal Central Java. Soon the village grew to become the center for dawah activities among distinguished Islamic proselytizers, traditionally known as Wali Songo or "the nine saints". At that time Glagah Wangi was a small fiefdom belonging to Majapahit. It was the only Majapahit fiefdom with a Muslim ruler. Then the name was changed to Demak, and it grew further by the establishment of a madrasa Islamic school and pesantren boarding school.$^{:13}$

#### Raden Patah

The foundation of Demak is traditionally attributed to Raden Patah (r. 1475–1518), a Javanese noble related to Majapahit royalty. At least one account stated that he was the son of Kertabhumi, who reigned as king Brawijaya V of Majapahit (1468–1478).
According to tradition, Raden Patah was the son of Majapahit King Kertabhumi with his concubine, a Chinese princess who resided in the Majapahit palace. She was supposedly given away when unknowingly pregnant with the king's child to be betrothed to the regent of the vassal state of Palembang. There Raden Patah was born in 1448 with the name Raden Hasan. After coming of age, he went to Ampel Denta in Java (now Surabaya) to learn from Sunan Ampel, a prominent ulama. Sunan Ampel betrothed him to his daughter, Nyai Ageng Malaka. Subsequently, in the 1470s, Sunan Ampel sent him to establish a new settlement in Glagah Wangi, Central Java. Through Sunan Ampel's recommendation, Raden Hasan was appointed as the regent of Glagah Wangi by King Kertabhumi of Majapahit, with the title Adipati Bintara.$^{:16}$
Dates for the end of the Majapahit Empire range from 1478, traditionally described in the sinengkalan or chandrasengkala (chronogram) Sirna ilang kertaning bhumi and corresponding to 1400 Saka,$^{:37and100}$) to 1517. In 1478 the Sudarma Wisuta war took place, when Ranawijaya's army under general Udara (who later became vice-regent) breached Trowulan defences and killed Kertabumi in his palace. Demak sent reinforcements under Sunan Ngudung, who later died in battle and was replaced by Sunan Kudus, but they came too late to save Kertabumi, although they managed to repel the Ranawijaya army. This event is mentioned in Trailokyapuri (Jiwu) and the Petak inscription, where Ranawijaya claimed that he already defeated Kertabhumi and reunited Majapahit as one kingdom. Ranawijaya ruled from 1474 to 1498 with the formal name Girindrawardhana, with Udara as his vice-regent. This event led to war between Demak and Daha, since Demak rulers were descendants of Kertabhumi.
In response to the collapse of Kertabhumi of Trowulan and the rise of Girindrawardhana of Daha in 1478, Demak decided it was no longer obliged to send tribute to the Majapahit central court and declared its independence. At that time Demak was temporarily led by Sunan Giri (Prabu Satmoto). Three years later the Islamic kingdom of Demak was established under the chronogram Geni mati siniram janmi, which corresponds to 1403 Saka or 1481 CE.$^{:13}$ Raden Hasan was crowned by members of Wali Songo under the new regnal name of Sultan Syah Alam Akbar Al-Fattah; thus in Javanese he was popularly known as Raden Patah.$^{:17}$
A Chinese chronicle in a temple in Semarang states that Raden Patah founded the town of Demak in a marshy area to the north of Semarang. After the collapse of Majapahit, its various dependencies and vassals broke free, including northern Javanese port towns like Demak.
As the sign of his new reign, Raden Patah built a new Grand Mosque as the center of Islamic teaching. He appointed members of Wali Songo as advisors within his new government: Sunan Kudus as qadi (great judge of religious law), Sunan Giri as mufti, and Sunan Kalijaga as imam and advisor.$^{:17}$
Demak managed to gain hegemony over other trading ports on the northern coast of Java such as Semarang, Jepara, Tuban, and Gresik. The supremacy of Raden Patah was expressed by Tomé Pires in Suma Oriental: "[S]hould de Albuquerque make peace with the Lord of Demak, all of Java will almost be forced to make peace with him... The Lord of Demak stood for all of Java". Apart from Javanese city-states, Raden Patah also gained overlordship of the ports of Jambi and Palembang in eastern Sumatra, which produced commodities such as lign-aloes and gold. As most of its power was based on trade and control of coastal cities, Demak can be considered a thalassocracy.

### Growth

Raden Patah's son, or possibly his brother, led Demak's brief domination in Java. He was known as Trenggana, and later Javanese traditions say he gave himself the title Sultan. It appears that Trenggana had two reigns—c. 1505–;1518 and c. 1521–1546—between which his brother in law, Yunus of Jepara, occupied the throne.
Between 1513 and 1518 Demak waged war against Patih Udara of Daha, the successor state of Majapahit located in today's Kediri. The main Demak army led by Raden Patah and Sunan Kudus marched overland through Madiun, while the Demak fleet led by Pati Unus took the sea route through Sedayu. Demak managed to consolidate its power by defeating Daha in 1518, because it was more accepted as the legitimate successor of Majapahit, since Raden Patah claimed direct descent from King Kertabhumi, who had died during the Girindrawardana invasion of Trowulan in 1478. Raden Patah died soon after this victory, also in 1518.$^{:18}$

#### Pati Unus

Raden Patah was succeeded by his brother-in-law Pati Unus or Adipati Yunus (r. 1518–1521), referred to by Tomé Pires in Suma Oriental as "Pate Onus" or "Pate Unus", brother in-law of "Pate Rodim". Before ascending the throne of Demak, he ruled Jepara, a vassal state to the north of Demak. Pati Unus ruled under the regnal name Sultan Syah Alam Akbar II.$^{:19}$
In two expeditions, with approximately 100 ships in 1513 and with 375 in 1521, Pati Unus led fleets from the Javanese coastal cities to seize the port of Malacca on the Malay Peninsula from the control of the Portuguese. The Javanese ports turned against the Portuguese for a number of reasons, the main one being opposition to Portuguese insistence on a monopoly of the spice trade. The Portuguese repelled both attacks, and the destruction of so many ships proved devastating to the Javanese ports, whose trading activity subsequently greatly declined.
Pati Unus was killed in the 1521 expedition, and was later remembered as Pangeran Sabrang Lor or "the Prince who crossed to the North" (the Java Sea to the Malay peninsula).

#### Sultan Trenggana

Pati Unus died childless, leading to the Demak succession crisis. The throne was contested between his brothers, the older Raden Kikin and the younger Raden Trenggana. According to tradition, the eldest son of Prince Trenggana, Prince Prawata, also known as Raden Mukmin, stole Keris Setan Kober, a powerful magical kris, from Sunan Kudus and used it to assassinate his uncle Raden Kikin by the river; Raden Kikin has since then also been known as Sekar Seda Lepen (flower that fell by the river). Raden Trenggana (r. 1522–1546) was then crowned by Sunan Gunungjati (one of the Wali Songo) and became the third and greatest ruler of Demak.
During Trenggana's reign a young man named Fatahillah came to his court to offer his service to the sultan. He had just returned from Mecca after several years studying Islam there, and had learned that his hometown in Pasai had been captured by the infidel Portuguese. He became a renowned general of Demak. Tradition has it that Trenggana was much impressed by Fatahillah's imposing figure and charisma and his knowledge of Islam, and gave him his daughter, the widow of Pati Unus, as his wife.$^{:21}$
After learning of the 1522 Portuguese-Sunda alliance, in 1527 the Sultan ordered Fatahillah to capture the ports of Banten and Sunda Kelapa from the Kingdom of Sunda. Sunda Kelapa was later renamed Jayakarta. From these territories he created the Sultanate of Banten as a vassal state under Hasanudin, son of Gunungjati, whom he also gave his sister's hand in marriage, creating a new dynasty.$^{:18}$
He appointed his daughter Ratna Kencana (popularly known as Ratu Kalinyamat) and her husband Sultan Hadlirin to rule Kalinyamat and Jepara. He also appointed Jaka Tingkir as Adipati (Duke) of Pajang and gave another daughter's hand in marriage to Jaka Tingkir.
Trenggana oversaw the spread of Demak's influence to the east and west. He conquered the Hindu-based resistance in Central Java and during his second campaign, conquered the last Javanese Hindu-Buddhist state, the largely defunct remnants of Majapahit; Tuban, an old Majapahit port mentioned in Chinese sources from the 11th century, was conquered in about 1527. During his reign Demak was able to subdue other major ports and its reach extended into some inland areas of East Java that are not thought to have been Islamized at the time.
His campaign ended when he sought to conquer the Hindu principality of Pasuruan in East Java and was killed in 1546. According to tradition, he was assassinated by a ten-year-old Duke of Surabaya, who stabbed with a kris while serving him betel nut.$^{:22}$

### Decline
#### Sunan Mukmin

The death of the strong and able Trenggana in 1546 triggered a blood feud and civil war between Prince Arya Penangsang, Adipati of the vassal state of Jipang [id], who was the son of the assassinated Sekar Seda Lepen (Raden Kikin), and Trenggana's son Prince Mukmin or Sunan Prawata, who had committed the murder. According to the Babad Demak chronicle, several influential figures of Wali Songo supported different candidates for the succession. Sunan Giri supported Prince Mukmin, while Sunan Kudus supported Arya Penangsang, since he belonged to the line of the eldest male son of the Demak dynasty. On the other hand, Sunan Kalijaga proposed Hadiwijaya, popularly known as Joko Tingkir, who was the adipati of Pajang and also a son in-law of Trenggana.$^{:23}$
Mukmin (r. 1546–1549) ascended the throne as the fourth Sultan of Demak. However, with the help of his teacher Sunan Kudus, Arya Penangsang of Jipang sent an assassin to kill Prawata and his wife using the same kris that Mukmin had used to kill his father.$^{:24}$

#### Arya Penangsang

Arya Penangsang (r. 1549–1568) ascended to the throne of Demak in 1549 after assassinating his cousin Sunan Prawata. Arya Penangsang was a valiant but vicious man who never hesitated to use brutal force to achieve his goals. Feeling threatened, Prawata's son Arya Pengiri sought refuge in his aunt's realm in Kalinyamat, Jepara.
Prawata's younger sister Ratu Kalinyamat sought justice from Penangsang's teacher Sunan Kudus, but he declined her request, deeming Penangsang's revenge justified since Prawata had assassinated Penangsang's father, Raden Kikin (Sekar Seda ing Lepen). On their way home from Kudus to Kalinyamat, Ratu Kalinyamat and her husband, Sultan Hadlirin, were attacked by Penangsang's men. Hadlirin was killed and Ratu Kalinyamat barely survived. She urged her brother in-law, Hadiwijaya (popularly known as Jaka Tingkir), Adipati of Pajang (now Boyolali), to avenge her husband's death by killing Arya Penangsang.
Arya Penangsang soon faced heavy opposition from his vassals for his harshness, and was dethroned by a coalition of vassals led by Hadiwijaya. In 1568, Hadiwijaya sent his adopted son and also his son in-law Sutawijaya, who would later become the first ruler of the Mataram dynasty, to kill Penangsang.
In 1568, after Penangsang was killed, Hadiwijaya assumed the role of sovereign. However, instead of ruling from Demak, he moved all of Demak's regalia, heirlooms, and sacred artifacts to Pajang. He appointed Prawata's son Sunan Pangiri as adipati of Demak. The relationship between the two states was now reversed: Pajang became the suzerain kingdom, while Demak became its vassal. Thus the Demak Sultanate ended with the foundation of the short-lived Kingdom of Pajang.$^{:24}$

## Family tree

The following is a version of the royal house of Demak. The relations between various members of this house are assumed mostly from Javanese traditions, oral or written in babads or other forms of writings.
Family tree of Demak Sultans :
| | | | | | | | | | | | | Pangeran Wironegoro | Pangeran Wironegoro | Pangeran Wironegoro | Pangeran Wironegoro | Pangeran Wironegoro | Pangeran Wironegoro | | | | | | | | | | | | | | | | | | | | | | | | | Sunan Ampel | Sunan Ampel | Sunan Ampel | Sunan Ampel | Sunan Ampel | Sunan Ampel | | | | | | | | | | |
| Putri of Randu Sanga | Putri of Randu Sanga | Putri of Randu Sanga | Putri of Randu Sanga | Putri of Randu Sanga | Putri of Randu Sanga | | | | | | | Solekha | Solekha | Solekha | Solekha | Solekha | Solekha | | | | | | | | | Raden Patah $^{(1)}$ r. 1478-1518 | Raden Patah $^{(1)}$ r. 1478-1518 | Raden Patah $^{(1)}$ r. 1478-1518 | Raden Patah $^{(1)}$ r. 1478-1518 | Raden Patah $^{(1)}$ r. 1478-1518 | Raden Patah $^{(1)}$ r. 1478-1518 | | | | | | | | | | | Dewi Murthasimah | Dewi Murthasimah | Dewi Murthasimah | Dewi Murthasimah | Dewi Murthasimah | Dewi Murthasimah | | | | | Sunan Kalijaga | Sunan Kalijaga | Sunan Kalijaga | Sunan Kalijaga | Sunan Kalijaga | Sunan Kalijaga |
| Raden Kanduruwan | Raden Kanduruwan | Raden Kanduruwan | Raden Kanduruwan | Raden Kanduruwan | Raden Kanduruwan | Pangeran Surowiyoto | Pangeran Surowiyoto | Pangeran Surowiyoto | Pangeran Surowiyoto | Pangeran Surowiyoto | Pangeran Surowiyoto | Ratu Mas Nyawa | Ratu Mas Nyawa | Ratu Mas Nyawa | Ratu Mas Nyawa | Ratu Mas Nyawa | Ratu Mas Nyawa | Ratu Pembayun | Ratu Pembayun | Ratu Pembayun | Ratu Pembayun | Ratu Pembayun | Ratu Pembayun | Dewi Ratih | Dewi Ratih | Dewi Ratih | Dewi Ratih | Dewi Ratih | Dewi Ratih | | | Pati Unus $^{(2)}$ r. 1518-1521 | Pati Unus $^{(2)}$ r. 1518-1521 | Pati Unus $^{(2)}$ r. 1518-1521 | Pati Unus $^{(2)}$ r. 1518-1521 | Pati Unus $^{(2)}$ r. 1518-1521 | Pati Unus $^{(2)}$ r. 1518-1521 | Ratu Wulungayu | Ratu Wulungayu | Ratu Wulungayu | Ratu Wulungayu | Ratu Wulungayu | Ratu Wulungayu | | | Trenggana $^{(3)}$ r. 1521-1546 | Trenggana $^{(3)}$ r. 1521-1546 | Trenggana $^{(3)}$ r. 1521-1546 | Trenggana $^{(3)}$ r. 1521-1546 | Trenggana $^{(3)}$ r. 1521-1546 | Trenggana $^{(3)}$ r. 1521-1546 | Ratu Pembayun | Ratu Pembayun | Ratu Pembayun | Ratu Pembayun | Ratu Pembayun | Ratu Pembayun |
| Arya Penangsang $^{(5)}$ r. 1547-1554 | Arya Penangsang $^{(5)}$ r. 1547-1554 | Arya Penangsang $^{(5)}$ r. 1547-1554 | Arya Penangsang $^{(5)}$ r. 1547-1554 | Arya Penangsang $^{(5)}$ r. 1547-1554 | Arya Penangsang $^{(5)}$ r. 1547-1554 | Raden Arya Mataram | Raden Arya Mataram | Raden Arya Mataram | Raden Arya Mataram | Raden Arya Mataram | Raden Arya Mataram | Raden Aryawangsa | Raden Aryawangsa | Raden Aryawangsa | Raden Aryawangsa | Raden Aryawangsa | Raden Aryawangsa | Raden Suryadiwangsa | Raden Suryadiwangsa | Raden Suryadiwangsa | Raden Suryadiwangsa | Raden Suryadiwangsa | Raden Suryadiwangsa | Sunan Prawoto $^{(4)}$ r. 1546-1547 | Sunan Prawoto $^{(4)}$ r. 1546-1547 | Sunan Prawoto $^{(4)}$ r. 1546-1547 | Sunan Prawoto $^{(4)}$ r. 1546-1547 | Sunan Prawoto $^{(4)}$ r. 1546-1547 | Sunan Prawoto $^{(4)}$ r. 1546-1547 | | | Ratu Kalinyamat Queen of Kalinyamat r. 1549-1579 | Ratu Kalinyamat Queen of Kalinyamat r. 1549-1579 | Ratu Kalinyamat Queen of Kalinyamat r. 1549-1579 | Ratu Kalinyamat Queen of Kalinyamat r. 1549-1579 | Ratu Kalinyamat Queen of Kalinyamat r. 1549-1579 | Ratu Kalinyamat Queen of Kalinyamat r. 1549-1579 | Pangeran Timur | Pangeran Timur | Pangeran Timur | Pangeran Timur | Pangeran Timur | Pangeran Timur | | | Ratu Mas Cempaka | Ratu Mas Cempaka | Ratu Mas Cempaka | Ratu Mas Cempaka | Ratu Mas Cempaka | Ratu Mas Cempaka | Adiwijaya Sultan of Pajang r. 1549-1582 | Adiwijaya Sultan of Pajang r. 1549-1582 | Adiwijaya Sultan of Pajang r. 1549-1582 | Adiwijaya Sultan of Pajang r. 1549-1582 | Adiwijaya Sultan of Pajang r. 1549-1582 | Adiwijaya Sultan of Pajang r. 1549-1582 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Awantipura Sultan of Pajang r. 1582-1586 | Awantipura Sultan of Pajang r. 1582-1586 | Awantipura Sultan of Pajang r. 1582-1586 | Awantipura Sultan of Pajang r. 1582-1586 | Awantipura Sultan of Pajang r. 1582-1586 | Awantipura Sultan of Pajang r. 1582-1586 |

## Economy

Demak derived its income from trade, importing spices and exporting rice to Malacca and the Maluku Islands. It was a busy port located at the end of a then navigable channel separating Java and Muria Island. The channel subsequently filled, joining Muria to Java; from the 15th to the 18th century until the 18th century, it was a major waterway for ships traveling along the northern Javanese coast to the Spice Islands and, via the Serang River, to the rice-producing interior of Java. This strategic location enabled Demak to become a leading trading center in Java.
According to Tomé Pires, Demak had more inhabitants than any other port in Sunda or Java, and was the primary exporter of rice to Malacca. Demak's prominence grew with that of Malacca, and was also enhanced by Raden Patah's claim of direct descent from Majapahit royalty and his marriage ties with neighboring city-states.

## Religion

Before the emergence of Demak, the northern coast of Java was the seat of many Muslim communities, both foreign merchants and local Javanese. The Islamization process gained momentum from the decline of the Hindu-Buddhist Majapahit Empire. Following the fall of the Majapahit capital to a usurper from Kediri, Raden Patah declared Demak's independence from Majapahit overlordship, and almost all northern Javanese ports later followed suit. However, the Demak royal family regarded themselves as descendants of Majapahit. Demak symbols continued to use the Surya Majapahit, an eight-pointed sun, while modifying it to remove Hindu associations. This modified symbol can be seen as decoration inside the Grand Mosque of Demak.
As the first Islamic polity in Java, Demak has a venerated status among Indonesian Muslims. It is traditionally linked with the legendary Wali Songo, the nine Muslim ulama who proselytized Islam among the then strongly Hindu-Buddhist population of Java. As an early Islamic polity, the Demak Great Mosque was built in Demak and still stands today, it is widely believed to be the oldest still-existing mosque in Indonesia. The surrounding maqam (tombs) of Wali saints and Demak sultans here continue to draw ziyarat pilgrimage among Muslims in the region.

## Legends

Later Javanese Babads provide varying accounts of the origins and expansion of Demak, but all describe it as the direct successor of Majapahit, not mentioning the possibility that by the time of its final conquest, Majapahit no longer ruled the area. The first "Sultan" of Demak, Raden Patah, is portrayed as the son of Majapahit's last king by a Chinese princess who was exiled from the court before Patah's birth; according to tradition, she first served as a concubine to Kertabhumi (Brawijaya V) in Trowulan, and when already pregnant with the king's son, was sent as a gift to marry the regent of Palembang.$^{:16}$
These legends suggest that the dynastic continuity survived the Islamization of Java, or alternatively that the rulers of Demak reinforced their rule on Java by claiming descent from the Majapahit dynasty as a source of political legitimation.