Majapahit was born from a Mongol failure. In 1293 Kublai Khan sent a fleet from Yuan Dynasty China to punish the Javanese kingdom of Singhasari, whose king had insulted his envoy. By the time the fleet arrived that king was dead. His son-in-law, Raden Wijaya, used the invaders to destroy his local enemies, then turned on them and drove them back to their ships. He founded a new court at Majapahit in the Brantas River valley of eastern Java.
The kingdom reached its height in the mid-fourteenth century under King Hayam Wuruk (r. 1350–1389) and his chief minister Gajah Mada, who is said to have sworn not to rest until the outer islands were brought under Majapahit. A court poem of 1365, the Nagarakretagama, lists dependencies from Sumatra and the Malay Peninsula to Borneo, Sulawesi and the Spice Islands. Historians doubt that the court truly governed all of these. The claims are better read as a sphere of tribute, trade and naval influence around a directly ruled core in eastern Java and Bali.
Majapahit's strength was that it had both things its predecessors had separately. Like the Khmer Empire, it rested on irrigated rice land that fed a dense population. Like the Srivijaya Empire, whose commercial role it inherited, it profited from the sea. Javanese ports exchanged the island's rice for cloves, nutmeg and mace from the Moluccas (Spice Islands), then sold those Spices to Indian, Chinese and Arab merchants riding the Monsoon Winds. Javanese Merchants and shipbuilders were active across the Indian Ocean Trade Network.
In religion the court blended the worship of Shiva with Mahayana Buddhism, treating the two as compatible paths, and its art and shadow-puppet theater drew on the Indian epics, a late flowering of the Spread of Hinduism and Buddhism into Southeast Asia.
Decline began with succession wars after 1400. More damaging was the rise of the Sultanate of Malacca, which drew trade to the straits, and the Spread of Islam along Java's north coast, where port rulers converted and broke away. The Muslim state of Demak conquered the remnant of the kingdom in the early sixteenth century. Much of the Hindu court culture survived on Bali, and modern Indonesia claims Majapahit as a precursor of national unity.