The soldiers of the new garrison and the artisans dispatched with them commenced construction of a system of defensive fortifications. These would become the Valdivian Fort System, the most important defensive complex of the American South Pacific coast. It is an exceptional example of the Hispanic-American school of fortification. Spanish authorities had convicts from all-over the Viceroyalty of Peru sent to build the for system, with the Spanish settlements in Corral Bay effectively becoming penal colonies. To avoid prisoner escapes the Spanish reached agreements with local Mapuches paying them for the recovery of fugitives. The convicts, many of whom were Afro-Peruvians, became later soldier-settlers once they had served their sentence. A 1749 census in Valdivia shows that a Afro-descendants had a strong presence in the area. In the 17th century Spanish soldiers lived together with local Mapuche in the fort, some of whom were slaves. Close contacts with the Mapuches made that many soldiers and prisoners had a certain command of Mapuche language.
