Settlement did not begin until Novais's establishment of São Paulo de Loanda (Luanda) in 1575, however, and the Portuguese government only formally incorporated Angola as a colony in 1655[citation needed] or on May 12, 1886.
[5] Angola was a part of Portuguese West Africa from the annexation of several territories in the region as a colony in 1655 until its designation as an overseas province, effective October 20, 1951.
[6] Contact with Brazil resulted in the transfer of cassava from South America to Angola and the transformation of Angolan agriculture, increasing the diversity of the local diet and reducing the impact of drought on farmers' harvest.
Even after Pedro IV restored the city and repopulated it in 1709, the ecclesiastical center of gravity in Angola rested with the Portuguese colony.
Initially, he had hoped to make it an aggressive military colony like Angola, but after an unsuccessful alliance with the local Imbangala, had had to abandon these plans.
These campaigns, especially ambitious ones in the 1770s, resulted in formal agreements of vassalage between some of the more important of the kingdoms, such as Viye and Mbailundu, but were never either large sources of slaves or real conquests from which resources or tribute could be drawn.
To this end, they established a fort and settlement at Encoje (near Mbwila) to block travel through the mountainous gap that allowed merchants to cross to Kongo.
In 1783–1784 they sought to occupy Cabinda on the north coast, but were driven away, and from 1789 to 1792 the Portuguese colonial government initiated a war against the Marquisate of Mussolo (the district immediately south of Ambriz in Kongo's territory) without much success.
The Portuguese from Benguela sought increasingly to expand their power and gain resource wealth in the Bihe Plateau during the eighteenth century, and following their intervention in the Mbailundu War in the 1770s had treaty relationships (which they described as vassalage) with the various states there.
Full Portuguese administrative control of the interior did not occur until the beginning of the 20th century, when resistance from a number of population groups was overcome.
After the definite partition of Africa among the European powers, Portugal applied herself with some seriousness to exploit Angola and her other African possessions.
Slavery and the slave trade continued to flourish in the interior in the early years of the 20th century, despite the prohibitions of the Portuguese government.
In September 1904 a Portuguese column lost over 300 men, including 114 Europeans, in the Battle of the Cunene, an encounter with the Kunahamas on the Kunene River, not far from the German frontier.
The slaving system began early in the 16th century with the purchase from African chiefs of people to work on sugar plantations in São Tomé, Príncipe, and Brazil.
Many scholars agree that by the 19th century, Angola was the largest source of slaves not only for Brazil, but for the Americas, including the United States.
The most important of these was the transcontinental Benguela railroad that linked the port of Lobito with the copper zones of the Belgian Congo and what is now Zambia.
The two colonies had initially been contiguous, but later became geographically separated by a narrow corridor of land, which Portugal ceded to Belgium allowing Belgian Congo access to the Atlantic Ocean.