A port that wants foreign trade needs foreign traders to actually stay, and staying means living under some legal order. Impose the host country's law wholesale and merchants unfamiliar with its procedures, language, and assumptions will take their ships to a port that asks less of them; leave them entirely unregulated and disputes go unresolved, trust erodes, and the state collects nothing from a community it can't govern at all.
Tang and Song China split the difference by geography and jurisdiction rather than by law alone. Foreign merchant communities in Guangzhou and other ports lived in a designated quarter and settled their own internal, community-level disputes under a recognized headman applying their own customs — a system the merchants' own accounts describe as fair and rarely contested — while remaining answerable to Chinese authority for serious crimes and anything that touched the wider city.
Let the community self-govern under a merchant headman applying their own customs to internal disputes, while the state kept serious crimes and cross-community matters.
Merchants trusted rulings from their own customs, so they stayed and kept trading.
The state kept a single accountable counterparty, the fanzhang, for order inside the quarter.
The boundary at the community's edge let China keep sovereignty and revenue without forcing assimilation.
When outsiders' customs don't fit your law, delegate internal matters to a leader you appoint, keeping jurisdiction over what crosses the boundary.
A 10th-century Arab merchant's own account (Abu Zayd al-Sirafi's Akhbar al-Sin wa'l-Hind) describes a Muslim official in Canton appointed by the Chinese ruler to judge disputes among Muslim merchants by Islamic law, adding that the merchants "never disputed" his rulings.
FOLLOW THE EVIDENCE
The sources
- The Muslim Merchants of Premodern China: The History of a Maritime Asian Trade Diaspora, 750-1400 Cambridge University Press · cambridge.org
- Abu Zayd al-Sirafi Wikipedia · en.wikipedia.org
- The Hui Muslims in China Indonesian Journal of Islamic History and Culture · journal.ar-raniry.ac.id