In the late sixteenth and early seventeenth centuries, states on the Central African coast found their economic power and territorial control threatened by Portuguese attempts to establish a colony at Luanda (in present-day Angola). Many of these states had become regional powers through trade in African slaves. It was the growing demand for this human labor in New World colonies such as Brazil that ultimately led Portugal to seek military and economic control of this region. Old trading partners came under military attack by Portuguese soldiers and indigenous African raiders in search of captives for the slave trade, and rulers were forced to adapt to these new circumstances or face certain destruction. One leader who proved to be adept at overcoming these difficulties was the queen of Ndongo, Ana Nzinga.
In 1624, Ana Nzinga inherited rule of Ndongo, a state to the east of Luanda populated primarily by Mbundu peoples. At that moment, the kingdom was under attack from both Portuguese as well as neighboring African aggressors. Nzinga realized that, to remain viable, Ndongo had to reposition itself as an intermediary rather than a supply zone in the slave trade. To achieve this, she allied Ndongo with Portugal, simultaneously acquiring a partner in its fight against its African enemies and ending Portuguese slave raiding in the kingdom. Ana Nzinga's baptism, with the Portuguese colonial governor serving as godfather, sealed this relationship. By 1626, however, Portugal had betrayed Ndongo, and Nzinga was forced to flee with her people further west, where they founded a new state at Matamba, well beyond the reach of the Portuguese. To bolster Matamba's martial power, Nzinga offered sanctuary to runaway slaves and Portuguese-trained African soldiers and adopted a form of military organization known as kilombo, in which youths renounced family ties and were raised communally in militias. She also fomented rebellion within Ndongo itself, which was now governed indirectly by the Portuguese through a puppet ruler. Nzinga found an ally in the Netherlands, which seized Luanda for its own mercantile purposes in 1641. Their combined forces were insufficient to drive the Portuguese out of Angola, however, and after Luanda was reclaimed by the Portuguese, Nzinga was again forced to retreat to Matamba. From this point on, Nzinga focused on developing Matamba as a trading power by capitalizing on its position as the gateway to the Central African interior. By the time of her death in 1661, Matamba was a formidable commercial state that dealt with the Portuguese colony on an equal footing. Nzinga, who reconverted to Christianity before her death at the age of eighty-one, became a sensation in Europe following the 1769 publication of Jean-Louis Castilhon's colorful "biography," Zingha, Reine d'Angola, in Paris.