The word barangay in modern use refers to the smallest administrative division in the Philippines, also known by its former Spanish adopted name, the barrio. This modern context for the use of the term barangay was adopted during the administration of President Ferdinand Marcos when he ordered the replacement of the old barrios and municipal councils. This act was eventually codified under the 1991 Local Government Code.
There are a number of distinctions between the modern Barangay or Barrio, and the city-states and independent principalities encountered by the Spanish when they first arrived in 1521 and established relatively permanent settlements in 1574. The most glaring difference would be that the modern entity represents a geographical entity, the pre-colonial barangays represented loyalty to a particular head (datu). Even during the early days of Spanish rule, it was not unusual for people living beside each other to actually belong to different barangays. They owed their loyalty to different Datus. Also, while the modern barangay represents only the smallest administrative unit of government, the barangay of precolonial times was either independent, or belonged to what was only a loose confederation of several barangays, over which the rulers picked among themselves who would be foremost - known as the Pangulo or Rajah. In most cases, his function was to make decisions which would involve multiple barangays, such as disputes between members of two different barangays. Internally, each datu retained his jurisdiction.
Historically, the first barangays started as relatively small communities of around 50 to 100 families. Most villages have only thirty to one hundred houses and the population varies from one hundred to five hundred persons. When the Spaniards came, they found communities with twenty to thirty people only. They also encountered large and prestigious principalities.
Theories, as well as local oral traditions, say that the original "barangays" were coastal settlements formed as a result of the migration of these Malayo-Polynesian people (who came to the archipelago) by boat from other places in Southeast Asia (see chiefdom). Most of the ancient barangays were coastal or riverine in nature. This is because most of the people were relying on fishing for supply of protein and for their livelihood. They also travelled mostly by water up and down rivers, and along the coasts. Trails always followed river systems, which were also a major source of water for bathing, washing, and drinking.
The coastal villages were more accessible to trade with foreigners. These were ideal places for economic activity to develop. Business with traders from other Countries also meant contact with other cultures and civilizations, such as those of Japan, Han Chinese, Indian people, and Arab people.
In time, these coastal communities acquired more advanced cultures, with developed social structures (sovereign principalities), ruled by established royalties and nobilities.
The barangays in some coastal places in Panay, Manila, Cebu, Jolo, and Butuan, with cosmopolitan cultures and trade relations with other Countries in Asia, were already established Principalities before the coming of the Spaniards. In these regions, even though the majority of these barangays were not large settlements, yet they had organized societies dominated by the same type of recognized aristocracy (with birthright claim to allegiance from followers), as those found in established Principalities. The aristocratic group in these pre-colonial societies was called the Datu Class. Its members were presumably the descendants of the first settlers on the land or, in the case of later arrivals, of those who were Datus at the time of migration or conquest. Some of these Principalities have remained, even until the present, in unhispanized and mostly Islamized parts of the Philippines, in Mindanao.
In more developed barangays in Visayas (e.g. Cebu, Bohol, and Panay) which were never conquered by Spain but were subjugated as vassals by means of pacts, peace treaties, and reciprocal alliances, the datu was at the top of the social order in a sakop or haop (elsewhere referred to as barangay).
This social order was divided into three classes. The members of the tumao class (which includes the datu) were the nobility of pure royal descent, compared by the Boxer Codex to the titled Spanish lords (señores de titulo). Below the tumao were the vassal warrior class known as the timawa, characterized by the Jesuit priest Francisco Ignatio Alcina as "the third rank of nobility" and by the conquistador Miguel de Loarca as "free men, neither chiefs nor slaves". These were people of lower nobility who were required to render military service to the datu in hunts, land wars (Mangubat or Managayau), or sea raids (Mangahat or Magahat). Aside from this, the timawa also paid taxes and tribute (buwis or handug) and were sometimes called upon for agricultural labor to the datu, though the personal vassals of the datu may be exempt from such obligations (the latter were characterized by the Boxer Codex as "knights and hidalgos). Below the timawa were the oripun class (commoners and slaves), who rendered services to the tumao and timawa for debts or favors.
To maintain purity of bloodline, the tumao usually marry only among their kind, often seeking high ranking brides in other barangay, abducting them, or contracting brideprices in gold, slaves and jewelry. Meanwhile, the datu keep their marriageable daughters secluded for protection and prestige. These well-guarded and protected highborn women were called binokot (literally "veiled" or "swaddled"), and the datu of pure descent (at least for four generations) were called potli nga datu or lubus nga datu.
The different type of culture prevalent in Luzon gave a less stable and more complex social structure to the pre-colonial Tagalog barangays of Manila, Pampanga and Laguna. Enjoying a more extensive commerce than those in Visayas, having the influence of Bornean political contacts, and engaging in farming wet rice for a living, the Tagalogs were described by the Spanish Augustinian friar Martin de Rada as more traders than warriors.
The more complex social structure of the Tagalogs was less stable during the arrival of the Spaniards because it was still in a process of differentiating. A Jesuit priest Francisco Colin made an attempt to give an approximate comparison of it with the Visayan social structure in the middle of the 17th century. The term datu or lakan, or apo refers to the chief, but the noble class to which the datu belonged to was known as the maginoo class. Any male member of the maginoo class can become a datu by personal achievement.
The term timawa referring to freemen came into use in the social structure of the Tagalogs within just twenty years after the coming of the Spaniards. The term, however, was being incorrectly applied to former alipin (commoner and slave class) who have escaped bondage by payment, favor, or flight. Moreover, the Tagalog timawa did not have the military prominence of the Visayan timawa. The equivalent warrior class in the Tagalog society was present only in Laguna, and they were known as the maharlika class.
At the bottom of the social hierarchy are the members of the alipin class. There are two main subclasses of the alipin class . The aliping namamahay who owned their own houses and served their masters by paying tribute or working on their fields were the commoners and serfs, while the aliping sa gigilid who lived in their masters' houses were the servants and slaves.
Upon the arrival of the Spanish, smaller ancient barangays were combined to form towns in a resettlement process known as Reducción. The policy coerced inhabitants of several far-flung and scattered barangays to move into an centralized cabecera (town) where a newly built church was situated. This allowed the Spanish government to control the movement of the indigenous population, to easily facilitate Christianization, to conduct population counts, and to collect tributes. Every barangay within a town was headed by the cabeza de barangay (barangay chief), who formed part of the Principalía - the elite ruling class of the municipalities of the Spanish Philippines. This position was inherited from the datu, and came to be known as such during the Spanish regime. The Spanish Monarch ruled each barangay through the cabeza, who also collected taxes (called tribute) from the residents for the Spanish Crown.