In 1498 Vasco da Gama reached Mozambique and Mombasa, and the next year he bombarded Mogadishu. Kilwa had long prospered from the gold trade at Sofala and was reached by Pedro Alvares Cabral in 1500. Da Gama imposed tribute two years later, and in 1503 Ruy Lourenço Ravasco collected tribute from Zanzibar. In 1505 the Portuguese led by Francisco d’Almeida built a fort at Sofala near the mouth of the Zambezi River before sacking and garrisoning Kilwa; Mombasa, Hoja, and Brava were only plundered. At Mozambique the Portuguese built a hospital, church, factory, warehouse and fort in 1507. Only Mogadishu was strong enough to maintain its independence from these attacks. By 1512 the Portuguese garrison and Franciscans left Kilwa, and Sofala also suffered because of lack of gold. Nuno da Cunha plundered Mombasa again in 1528. The Turks raided the east coast down to Malindi in 1540. By then posts were established at Sena and Tete for gold mining up the river. The Portuguese destroyed the shipping at Mogadishu in 1541. Led by Francisco Barrero, they invaded the Zambezi lowlands in 1571 and massacred Muslim traders. Another Portuguese invasion three years later forced the Uteve ruler to pay tribute to Sofala. Yet the Mutapa state managed to retain its independence on the eastern plateau.
In 1585 Turks led by Emir ‘Ali Bey caused revolts from Mogadishu to Mombasa against the Portuguese landlords; only Malindi remained loyal to Portugal. Zimba cannibals overcame the towns of Sena and Tete on the Zambezi, and in 1587 they took Kilwa, killing 3,000 people. At Mombasa the Zimba slaughtered the Muslim inhabitants; but they were halted at Malindi by the Bantu-speaking Segeju and went home. This stimulated the Portuguese to take over Mombasa a third time in 1589, and four years later they built Fort Jesus to administer the region. Between Lake Malawi and the Zambezi mouth, Kalonga Mzura made an alliance with the Portuguese in 1608 and fielded 4,000 warriors to help defeat their rival Zimba, who were led by chief Lundi.
A Portuguese captain made Malindi king al-Hasan bin Ahmad sultan of Mombasa, but arrogant commandants irritated him. In 1614 he went to the Portuguese viceroy at Goa in India to complain. When he returned to Mombasa the next year, he fled to the Nikiya tribe and was assassinated for a Portuguese bribe. The highest ecclesiastical court in Portugal ruled that the king was wrongly murdered and that his son Yusuf bin al-Hasan was his rightful heir. Yusuf was then educated at Goa and baptized as Dom Jeronimo Chingulia by the Augustinian order. He returned with a Portuguese wife to rule Mombasa in 1630. The next year a Portuguese spy saw him praying like a Muslim at his father’s grave and reported it to Portuguese captain Pedro Leitao de Gamboa; but the spy also informed King Yusuf about this. Yusuf stabbed the captain as 300 of his followers took over Fort Jesus from the garrison. Some who refused to convert to Islam were killed, and 400 were sold as slaves. A Portuguese fleet with a thousand troops arrived the next year but could not retake Mombasa. Yusuf captured two ships and fled to Pate. Portuguese captain Francisco de Seixas de Cabreira hunted him down there and rejected a bribe of 4,000 paradaos. He punished Pate in 1636 by beheading 200 of their leaders and chopping down 10,000 coconut trees, demanding 8,000 paradaos; Siu and Manda were forced to pay heavy tribute and destroy their defensive walls. Yusuf escaped, but while trying to get Turkish support he died at Jidda in 1638.
Arabs in Oman led by Nasir ibn Murshid rose up against the Portuguese in 1643 by capturing the fort at Sohar. In 1650 they expelled the Portuguese from the trading port of Muscat. They built a fleet and responded to appeals from Mombasa by attacking the Portuguese on Zanzibar in 1652. The Otondo queen of Pemba accepted the imam of Oman and paid tribute. Captain Cabreira from Mombasa quickly arrived to burn her town and attack the Omani ships at Pemba. In 1660 the Omani navy landed at Mombasa and drove the Portuguese into Fort Jesus. Nine years later eighteen Omani ships invaded Mozambique but could not capture the Portuguese fort. In 1678 Portuguese viceroy Dom Pedro de Almeida from Goa assaulted Pate and set up his headquarters in the mosque. The Portuguese were supported by the Faza king who brought a thousand Wagunya allies, though 200 of them mutinied and were massacred. The soldiers raided Pate and the cities of Siu, Lamu, and Manda, and Almeida ordered the four kings of these cities beheaded. After Omani troops from four ships arrived three days later, the Portuguese fled, leaving behind half of their ivory booty.
In August 1686 Joao Antunes Portugal organized political support in Mombasa for an attack on Pate but did not take the island until Arab ships withdrew a year later. The people of Pate did not resist and promised to pay 17,000 crusados. Within a few weeks Portugal arrested the king and twelve elders and sent them to Goa, where they were executed on Christmas Day 1688. A year before that, an Arab fleet from Muscat had arrived at Pate, and Portugal had retreated back to Mombasa. In 1694 the island of Pemba overthrew the Portuguese masters. Two years later the Omani fleet besieged Mombasa as the population of 2,500 fled into Fort Jesus. The Zanzibar queen sent supplies to this last Portuguese bastion in East Africa, but the Portuguese failed to relieve the fort. They held out for 33 months, dying of hunger and smallpox before the last thirteen survivors surrendered to the Arabs. The Omanis then sent garrisons to Pemba, Kilwa, and other cities.
The Omanis governing Mombasa were of the Mazrui lineage. The Portuguese occupied Mombasa once more in 1728. The same year the king of Pate agreed to garrison 150 Portuguese soldiers and give Portugal a monopoly on ivory. After the people of Pate refused to build the fort and burned down half of Pate, the king sold the Portuguese a ship to return to Goa. In Mombasa townsmen joined by Musungulos murdered some Portuguese outside the fort in April 1729, taking the outpost fort at Makupa. Other towns rebelled against the Portuguese also, and in November 1729 the Portuguese abandoned Mombasa for good. The Omani Arabs soon arrived and took over Pate and Mombasa. After Sohar governor Ahmad bin Sa’id founded the al-Busa’idi dynasty of Oman in 1744, the Mazrui leader Muhammad bin Uthman proclaimed himself governor of Mombasa. Soon Pate, Malindi, Pemba, Zanzibar, and Mafia became independent also. In 1745 Bwana Mkuu took power on Pate. The next year Omani agents murdered Muhammad bin Uthman and imprisoned his Mazrui brother ‘Ali ibn Athman, who escaped, rallied the people, overthrew the new governor, and executed the assassins. ‘Ali (r. 1746-55) proclaimed himself sultan at Mombasa and seized Pemba, but a family quarrel prevented him from taking over Zanzibar. His successor Mas’ud ibn Nasir (r. 1756-73) cooperated with Pate and developed Mombasa’s relationship with the inland Nyika, extending Mazrui influence from Pangani to Malindi.
The Portuguese attempts to exploit East Africa for its gold, ivory, and slaves had little positive effect except for the foods they introduced from America. Cassava was brought from Brazil to Mozambique in 1750 and gradually spread. A Portuguese governor remained at Mozambique and in 1756 sent spies to Mombasa and Muscat. Another Portuguese attempt to attack Mombasa in 1769 failed. Omanis had revived Kilwa by developing the ivory and slave trades for the French, who acquired the Mascarene Islands; but in 1771 the Omani governor was driven out of Kilwa. Portuguese conflicts with the Makua disturbed Mozambique, which was competing with Swahili and Arab merchants. The French had occupied the island of Mauritius in 1714, and the number of slaves increased steadily. In 1776 French trader Jean-Vincent Morice made an agreement with the sultan of Kilwa to purchase one thousand slaves a year for twenty piastres each to supply the French plantations on the islands of Mauritius and Bourbon. After Oman ruler Ahmad ibn Sa’id died in 1784, Saif ibn Ahmad claimed the throne. His son Ali conquered Kilwa, but Zanzibar held out with its governor. Eventually Zanzibar and Kilwa surrendered to the new Omani ruler.
The Portuguese signed treaties with chiefs in western Madagascar in 1613, and a Jesuit mission went up the river Manambovo to Sadia three years later. A civil war broke out and affected the founding of the Sakalava kingdom of Menabe. In the Luso-Dutch treaty of 1641 the Portuguese claimed western Madagascar; but mostly they used it to supply slaves to the Dutch East India Company, which had taken over Mauritius for its timber. The French built Fort Dauphin in 1643, but they abandoned it in 1674; their governor Etienne de Flacourt (r. 1648-58) wrote two books about Madagascar. A census taken at Barbados in the West Indies at the end of the 17th century found that half of their 32,473 slaves were from Madagascar. In the 18th century Madagascar supplied thousands of slaves to the French plantations on Mauritius and Bourbon (Réunion). In the central Imerina Romboasalama overthrew his uncle Ambohimanga about 1785 and proclaimed himself King Andrianampoinimerina. By 1792 he had eliminated two other local kings and moved his capital to Antananarivo.
After 1500 Bito kings from Bunyoro sent out raiding parties, and their chiefs took over tribes such as the Haya of Kiziba, Kooki, Toro, Busoga, and Buganda in the region northwest of Lake Victoria. These chiefs set up independent kingdoms; but they became overextended. This region suffered four terrible droughts that began in 1588 and included a five-year famine that ended in 1621. People believed these natural disasters were “sent by God” and so called this period the Nyarubanga, during which many people migrated. About 1650 Ankole defeated the Bunyoro army, and Ganda king Katarega expanded his realm by war west to Mawokota, Gomba, Butambala, and Singo. Bunyoro men were usually busy cultivating the land, since they believed it was wrong for women to do this work. The Ganda ate mostly bananas and could leave the work of supplying food to the women. With a centralized kabaka (king) the Buganda kingdom was more stable. Kabaka Tebandeke (c. 1644-74) increased his royal power by reforming the exploitation of the religious rituals. So as not to be dependent on Bunyoro for iron and smiths, Mawanda (c. 1674-1704) expanded Buganda territory into Singo, eastern Kyaggwe, and Bulamogi. His officials became more influential than the local chiefs. After 1700 Buganda avoided succession struggles by letting two senior officials choose the new kabaka. Junja annexed Buddu and got Kooki to pay tribute. Kabaka Kamanya took Buwekula from Bunyoro and developed a trade route to the coast.
Bunyoro still suffered many succession disputes, and Omukama Isansa (c. 1733-60) persecuted his opponents in Paluo, causing them to migrate to Acholi in northern Busoga. His wars in the south provoked Kooki and the Busongora states of Kisaka and Bugaya eventually to become independent of the Bunyoro empire. Isansa alienated the Cwezi cult by attacking the Wamara palace in Bwera. Because of this sacrilege, people believed that Buganda would swallow up Bunyoro.
Before the slave trade and European guns, most Africans lived and traded more peacefully with each other and the Arabs or Indians on the coast. The Masai tribes east of Lake Victoria were exceptional in that they were trained to be warriors and limited their consumption to the products of their herds. After 1700 the number of slaves captured in the interior of east and central Africa by Omani Arabs and Portuguese increased to about one or two thousand per year by 1750; but the French escalated this to supply their plantation labor on the islands of Mauritius and Bourbon.