The Portuguese established their primary early trading post at Soyo, which is now the northernmost city in Angola apart from the Cabinda exclave. Paulo Dias de Novais founded São Paulo de Loanda (Luanda) in 1575 with a hundred families of settlers and four hundred soldiers. Benguela was fortified in 1587 and became a township in 1617. The Portuguese established several other settlements, forts and trading posts along the Angolan coast, principally trading in Angolan slaves for plantations. Local slave dealers provided a large number of slaves for the Portuguese Empire, usually in exchange for manufactured goods from Europe. This part of the Atlantic slave trade continued until after Brazil's independence in the 1820s. Despite Portugal's territorial claims in Angola, its control over much of the country's vast interior was minimal. In the 16th century Portugal gained control of the coast through a series of treaties and wars. Life for European colonists was difficult and progress was slow. John Iliffe notes that "Portuguese records of Angola from the 16th century show that a great famine occurred on average every seventy years; accompanied by epidemic disease, it might kill one-third or one-half of the population, destroying the demographic growth of a generation and forcing colonists back into the river valleys". During the Portuguese Restoration War, the Dutch West India Company occupied the principal settlement of Luanda in 1641, using alliances with local peoples to carry out attacks against Portuguese holdings elsewhere. A fleet under Salvador de Sá retook Luanda in 1648; reconquest of the rest of the territory was completed by 1650. New treaties with the Kongo were signed in 1649; others with Njinga's Kingdom of Matamba and Ndongo followed in 1656. The conquest of Pungo Andongo in 1671 was the last major Portuguese expansion from Luanda, as attempts to invade Kongo in 1670 and Matamba in 1681 failed. Colonial outposts also expanded inward from Benguela, but until the late 19th century the inroads from Luanda and Benguela were very limited. Hamstrung by a series of political upheavals in the early 1800s, Portugal was slow to mount a large scale annexation of Angolan territory. The slave trade was abolished in Angola in 1836, and in 1854 the colonial government freed all its existing slaves. Four years later, a more progressive administration appointed by Portugal abolished slavery altogether. However, these decrees remained largely unenforceable, and the Portuguese depended on assistance from the British