Launch app →

Human verified. Last updated by our editorial team on .

Oceania · The Islamic sultanates

Demak Sultanate

1475–1554

Demak was the first Islamic state on Java: a north-coast sultanate founded in the late fifteenth century, which replaced the Hindu-Buddhist kingdom of Majapahit, established Islam as the religion of the Javanese courts, and lasted less than a century before its own vassals divided its inheritance.

Existed
1475–1554
Shown on the map
1475–1551
Peak area
46k km²
Region
Oceania

Its importance is out of all proportion to its size. Demak is where the Javanese synthesis of Islam and local culture was made — the mosque with its tiered roof, the wayang repertoire reshaped for Islamic stories, the Wali Sanga tradition of nine saints — and it is the ancestor of Banten, Cirebon, Pajang and Mataram, the states that governed Java until the Dutch.

At a glance

NameDemak Sultanate; the Sultanate of Demak
Datesc. 1475–1554 (the site draws 1475–1551)
WhereJava's north coast, around Demak, Jepara and Semarang
CapitalDemak
FounderRaden Patah, according to the Javanese tradition
ReligionIslam, in the Javanese synthesis attributed to the Wali Sanga
EconomyRice, teak, shipping and the spice trade; Chinese and Gujarati merchants
EndSuccession wars after 1546; superseded by Pajang and then Mataram

What was Demak?

A port kingdom on Java's north coast that became the first Muslim state on the island. Its rise was commercial and religious at once: the north coast had been Islamised by traders and sufis for a century, the port cities had grown rich on the spice route, and the Hindu-Buddhist capital at Majapahit had declined. Demak was the state that turned that combination into a sultanate.

Its territory was the coastal strip between Jepara and Semarang, with the Muria strait as its waterway and the rice plain behind it; its fleet was one of the largest in the region; and its court was the centre of the Wali Sanga tradition, the network of nine saints credited with converting Java.

Who founded it?

Raden Patah, according to the Javanese chronicles — a prince of Majapahit descent, son of the last king's daughter, raised in Palembang or Gresik and installed at Demak with the blessing of the saints. The Babad Tanah Jawi and the Serat Kandha give the story, and it is the foundation myth of Islamic Java.

The problem is that the story cannot be dated. The Javanese chronicles give a chronogram — 1478 — for the fall of Majapahit and the rise of Demak, but a chronogram is a word-puzzle, not a date, and the same sources give several different figures. De Graaf's study concluded that the traditional 1478 "is really 1527", and that the conquest of Majapahit happened half a century later than the chronicles suggest.

What does the Chinese evidence say?

Less than it is often made to say. A famous claim holds that the Ming records call the ruler of Demak "Pate Rodim" in 1411, which would make the sultanate older than the chronicles say. The record does not: the 5 August 1411 entry of the Ming Shi-lu names "Ba-di Di-man, the ruler of Xin Cai-cai" — Xin-zhuang, that is Gresik — and it is a Chinese or Cantonese merchant-chief there, not a ruler of Demak. The Chinese sources never mention Demak at all.

"Pate Rodim" comes from Tomé Pires, the Portuguese apothecary who wrote in 1515, and it is not Raden Patah either: Pires's Rodim is the second and third ruler in the sequence, and the later Rodin is the king the Portuguese called Tranggana. The identification of Pate Rodim with Raden Patah is an old conflation, already present in Cortesão's edition, and it has been repeated ever since.

What about the mosque?

The great mosque of Demak is the oldest surviving mosque in Java, and its date is a sequence rather than a moment.

The great mosque of Demak, the oldest surviving mosque in Java, with its tiered roof According to the mosque's own management, the site was a pesantren — a religious school — of Glagah Wangi from 1466 (1388 Śaka); it became a kadipaten, a princely seat, in 1477; and the mosque in its sultanate form dates from 1479 (1401 Śaka), with the bulus relief in the mihrab as its marker.

The Babad Tanah Jawi gives a different figure, equivalent to about 1498, and the tradition has others. What is certain is that the building is fifteenth-century, that its tiered roof is the model for Javanese mosques ever since, and that it is a registered heritage structure — RNCB.20151218.04.000096, under decree 243/M/2015 — which is the citable official fact.

Why did Majapahit fall?

Because it had already declined, and because the coast had changed sides. Majapahit's capital was in the interior, its revenue depended on the ports, and the ports had become Muslim and rich; the last king, Brawijaya, is described in the chronicles as weak and divided from his own nobles. Demak's conquest of the capital, dated 1527 by de Graaf, was the end of a process rather than a single battle.

The chronicles give 1478, and the date has entered Indonesian national memory as the year Majapahit fell. The two dates are not reconcilable, and this entry follows the evidence: 1527, with the chronogram explained.

## What was the relationship with the Portuguese?

Hostility, from the first. When Albuquerque took Malacca in 1511, the Javanese lost their principal market and their route to the spice islands; Demak and Jepara sent expeditions against the Portuguese in 1513 and again in 1521, and both failed. The Portuguese, for their part, tried to divert the spice trade to their own fortress and to license the shipping that had made the Java Sea prosperous.

The result was a long commercial war that Demak could not win at sea and the Portuguese could not win on land. Javanese junks continued to trade, often through intermediaries and in defiance of Portuguese passes; the north coast ports kept their Chinese and Gujarati connections; and the centre of gravity shifted east, to the ports that the Portuguese could not reach.

What was the economy?

Rice, teak and ships. The north coast was the rice surplus of Java, and Demak's hinterland produced it; the teak forests of the Muria peninsula gave it timber for shipbuilding, and Demak's junks were among the largest in the region — a Portuguese letter of 1513 describes a Javanese junk of enormous size. The ports traded rice, timber, cloth and foodstuffs for spices, Chinese ceramics, Indian textiles and silver.

The silting of the Muria strait was the state's slow disaster: the river mouth filled, the harbour moved, and the commercial primacy of Demak passed to Jepara and then to Mataram's ports. A maritime state that loses its water is a state that loses its revenue.

## How was it governed?

As a sultanate on the Persian-Indian model, adapted to Javanese practice. The sultan ruled with a council of officials and religious advisers; below him, the bupati — the regional lords — governed districts with their own courts, troops and revenues, and their loyalty was the state's real currency. The coastal cities retained their own heads and their own commercial law.

That structure explains both Demak's strength and its weakness. It could mobilise the coast quickly, as it did for the expeditions against Malacca; but it could not control its own vassals, and after Trenggana's death those vassals became the competitors who destroyed it. The Javanese state was always a coalition of lords, and the sultan was the largest lord among them.

What was the religion?

Islam, in a Javanese form. The Wali Sanga — the nine saints — are the tradition's explanation of how Java converted: a network of teachers, some of them foreign, some Javanese, who established schools at Giri, Kudus, Ampel and elsewhere and converted the courts from the top down. Ricklefs's caution is worth quoting: the lists of nine vary so much that it is "impossible to reduce these variations to a list of nine".

What the saints left was a synthesis. The mosque kept the tiered roof of the temple; the wayang kept its repertoire and acquired Islamic heroes; the court kept its rituals and its calendar while adopting the faith. Demak's Islam was not a rupture with Java's past but a translation of it, and that is why it survived where the Portuguese in Malacca did not.

## What did the saints actually do?

They founded schools, converted courts and made compromises. The Wali Sanga tradition describes nine teachers — Sunan Ampel at Surabaya, Sunan Giri at Gresik, Sunan Kudus, Sunan Kalijaga, Sunan Bonang, Sunan Muria, Sunan Drajat, Sunan Gunung Jati at Cirebon and Maulana Malik Ibrahim at Gresik — who worked along the north coast in the fifteenth century, and whose graves are still pilgrimage sites.

Their method was accommodation. Islam was preached in Javanese, through Javanese forms: the wayang was kept but its stories were given Muslim heroes; the gamelan and the slametan were retained; the mosque took the tiered roof of the temple. That is why Javanese Islam looks unlike Islam in Arabia or India, and why the conversion held when the Portuguese missionary effort in Malacca did not.

How did it end?

In succession wars. Trenggana, the greatest of the Demak sultans, was killed in 1546 while campaigning against the Hindu kingdom of Blambangan in eastern Java; his death opened a struggle among his relatives and vassals that lasted decades. Pajang, in the interior, emerged as the dominant power, and from Pajang came Mataram, which absorbed the coast and became the great Javanese sultanate.

The end date is disputed: 1546, 1549, 1554, 1568 and 1588 all appear in the literature, depending on whether one dates the death of Trenggana, the loss of the coast, the rise of Pajang or the final extinction of the line. The site draws 1551, a date this research could not connect to any source — 1551 is Jepara's expedition with Johor, not the end of Demak.

## What was the north coast like?

Cosmopolitan, commercial and shallow. The north coast of Java is a belt of ports and rice plains facing the Java Sea, and in the fifteenth and sixteenth centuries it was one of the busiest trading regions in the world: Chinese junks, Gujarati ships, Malay praus and Javanese junks met at Gresik, Tuban, Jepara and Demak, exchanging spices, textiles, ceramics, rice and timber.

The society that produced Demak was therefore urban and mixed — Javanese, Chinese, Arab, Indian and Malay communities living in the same ports, with their own quarters, laws and mosques. The sultanate's Islam was made in that milieu, and its decline was partly the decline of the coast as the river mouths silted and the trade moved.

What is the legacy?

Islamic Java. Demak established the model of the Javanese sultanate — a coastal port with an interior hinterland, a court legitimated by the saints, a mosque with a tiered roof, a law code combining Islam and custom — and every later Javanese state inherited it. The Wali Sanga tradition, the Demak mosque, the graves of the saints and the chronicles that narrate it all originate here.

It is also the beginning of the north coast's decline relative to the interior. Demak was a maritime state; the states that followed it — Pajang, Mataram — were agrarian and inward-looking, and the shift from coast to interior is one of the deep structures of Javanese history.

Common myths about Demak

MythWhat the evidence says
The Ming records name a ruler of Demak in 1411They name the ruler of Gresik, not Demak; the Chinese sources never mention Demak.
Pate Rodim was Raden PatahPires's Rodim is the second and third ruler; the later Rodin is Tranggana.
Majapahit fell in 14781478 is a chronogram; de Graaf dates the fall to 1527.
The mosque dates from 1479 in one actIt was a school from 1466, a princely seat in 1477 and a sultanate mosque in 1479.
Demak was a purely Javanese stateIt was a cosmopolitan port, trading with Chinese, Gujarati and Malay merchants.
The Wali Sanga were exactly nineThe lists vary so much that no fixed nine can be established.
Demak ended in 1551The end date is disputed; 1551 corresponds to Jepara's expedition with Johor, not the sultanate's end.
Islam arrived in Java by conquestIt arrived by trade, preaching and court conversion, and Demak's Islam kept much of the old culture.

Timeline of Demak

YearEvent
1466Pesantren of Glagah Wangi founded
1477The site becomes a princely seat
1479The sultanate mosque (1401 Śaka)
1511–13Portuguese take Malacca; Javanese expeditions against it
1515Pires writes his account of Java
1527Majapahit falls (de Graaf)
1546Trenggana killed at Blambangan
1546–68Succession wars; Pajang rises
1587Mataram founded at Kotagede

What the map shows next

At 1513 on the map Demak is the leading power on Java, and Singhasari is two centuries gone.

At 1588 on the map the Mataram Sultanate has been founded, and Demak is a memory.

Common questions

What was the Demak Sultanate?
The first Islamic state on Java, a north-coast sultanate founded in the late fifteenth century, which replaced Majapahit and established the Javanese Islamic synthesis.
Who founded it?
Raden Patah, according to the Javanese chronicles; the dating of his reign is uncertain.
When did Majapahit fall?
In 1527 according to de Graaf's study; the chronicles' 1478 is a chronogram, not a date.
Is the 1411 Chinese reference to Demak?
No: it refers to the ruler of Gresik, and the Chinese sources never mention Demak.
What was the Wali Sanga?
The nine saints of Javanese tradition, a network of teachers credited with converting Java; the lists of nine vary.
What was the economy based on?
Rice, teak and shipping, with trade in spices, textiles and ceramics through the Muria strait.
Why did Demak decline?
The silting of its harbour and the succession wars after Trenggana's death in 1546.
What replaced it?
Pajang, and then Mataram, which absorbed the north coast.
When did it end?
Probably in the 1550s–1560s, though dates from 1546 to 1588 appear in the literature.
What is its legacy?
Islamic Java: the sultanate model, the tiered-roof mosque, the saint tradition and the chronicles.

Sources

Every source below was consulted while writing this entry.

Every source below was consulted while writing this entry.

Primary and official sources

  1. The Ming Shi-lu entry of 5 August 1411, in Wade's translation.
  2. Tomé Pires, Suma Oriental (1515), in Cortesão's edition.
  3. The Babad Tanah Jawi and the Serat Kandha.
  4. The Babad Demak, as cited by the mosque's management.
  5. Heritage decree 243/M/2015 and registration RNCB.20151218.04.000096.
  6. The Portuguese letter of 1513 on the Javanese junk, in Andrade's study.

Scholarship and reference works

  1. de Graaf and Pigeaud, on the early Islamic states of Java.
  2. de Graaf, on the fall of Majapahit and the Demak chronology.
  3. Ricklefs, A History of Modern Indonesia, and The Seen and Unseen Worlds in Java.
  4. Guillot, BEFEO (1993), on Banten and the Sunda kingdom.
  5. Hall, A History of Early Southeast Asia.
  6. Reid, Southeast Asia in the Age of Commerce.

Data sources for the map

  1. Cliopatria v0.12 (Seshat Global History Databank, CC BY 4.0).
  2. Historical Basemaps (GPL-3.0).

This entry was written from the sources above and last updated .

Text available under CC BY-SA 4.0: reuse it with a credit to The World Through Time and a link to this page.

Border geometry for the map itself comes from Cliopatria v0.12 (Seshat Global History Databank, CC-BY-4.0).

History in your inbox, once a week

A weekly email with new articles and glossary entries. Unsubscribe anytime. Privacy policy.

See the Demak Sultanate in its world

Open the atlas at 1513 and every neighbour, rival and successor is on screen with it — then drag the slider and watch what happens next.

Open the map at 1513 →