Apart from the few Malays in the settlements ' rural communities of Province Wellesley and the Melaka hinterland , most still lived inland along the middle reaches of the rivers , away from the coastal marshlands dominated by the orang laut pirates .
The region 's inhabitants were located mostly along the coast , with fortified garrisons that protected them from pirates .