The Hukum Kanun Pahang was a comprehensive legal code that governed the state, regulated trade, defined justice, and set limits on royal authority.