In 800 YK, the Kingdom of Galifar made an agreement with a collection of pirate leaders. The agreement was called the Stormreach Compact. The compact gave legal authority of Stormreach to the Storm Lords . It also established the powers each Storm Lord would have based on their family line. As a minor note, the compact also codifies several statutes that apply to everyone in city.
City of Stormreach (book) page 55