Population resettlement was part of a system of social reengineering imposed by Spanish rule in the Americas. It started by creating a new type of indigenous community known as pueblos de indios, whose goal was to supply labour for colonial economic projects. As part of the same system, during the seventeenth century the Spanish created towns specifically for Afrodescendants. They included: Villa de la Gomera in Guatemala; El Realejo, San Felipe de Austria, Santa María del Haro de Nueva Segovia and Abierto de Granada in Nicaragua; San Vicente in El Salvador; and La Puebla de los Pardos in Costa Rica. This urban reengineering sought to strengthen the demographic limits of the empire and, more importantly, to facilitate tax collection by the Crown (AGI, Guatemala 43, N 49; Cáceres, 2000).  
In the urban centres, the Afrodescendants worked as artisans, tailors, blacksmiths, carpenters, weavers, cobblers, merchants and service employees. In the rural areas of Costa Rica, in Matina for example, they farmed lands and cacao fields. They were also actively involved in regional trade. By this time, they spoke Spanish, were catholic, paid taxes, took part in the militias and years later were politically prepared to ask for the right to be Spanish citizens during the Cádiz Cortes of 1812.  
Throughout the colonial period, some Afrodescendants managed to develop successful economic activities and become part of the elite. Many Afrodescendants had never been enslaved, and although they were part of the militias, spoke Spanish and were catholic, there were still some sectors of the society that wanted these free individuals to be placed into slavery. The permanent threat of enslavement haunted the free Afro-mestizos, who by the day were rising in number within an increasingly mixed society.