Before the arrival of the Spanish colonizers in the Philippines in the 16th century, the Barangays were well-organized independent villages - and in some cases, cosmopolitan sovereign principalities, which functioned much like a city-state. The Barangay was the dominant organizational pattern among indigenous communities in the Philippine archipelago.