Easily supplied and defended by sea, the factories worked as independent colonial bases. They provided safety, both for the Portuguese, and at times for the territories in which they were built, protecting against constant rivalries and piracy. They allowed Portugal to dominate trade in the Atlantic and Indian oceans, establishing a vast empire with scarce human and territorial resources. Over time, the "feitorias" were sometimes licensed to private entrepreneurs, giving rise to some conflict between abusive private interests and local populations, such as in the Maldives.