In the sixteenth century, Muslims dominated Indian Ocean long-distance trade. Shari’a functioned as a cosmopolitan legal code that enabled merchants from different cultures to negotiate. Whereas the Dutch and Portuguese struggled to monopolize East Asian trade, the sultans of Southeast Asia resisted this monopoly in the name of the Islamic doctrine of the freedom of the seas. Superior naval power enabled the Dutch to impose humiliating, one-sided legal treaties on Sultanates throughout Indonesia. Acts of resistance to the Dutch were defined by the Dutch as “piracy” but by the Indonesians as part of a just war, or jihad. Today, many Indonesians view the tradition of international law founded four centuries ago with deep skepticism, and continue to see shari’a as a more secure basis for a just state and society.