Wikipedia says this about the Yao people:
The Yao people, Wayao, are a major ethnic and linguistic group based at the southern end of Lake Malawi, which played an important part in the history of East Africa during the 19th century. The Yao are a predominantly Muslim people group of about 2 million spread over three countries, Malawi, northern Mozambique, and in Ruvuma Region and Mtwara Region of Tanzania. The Yao people have a strong cultural identity, which transcend the national borders.
HISTORY
When Arabs arrived on the east coast of Africa they began trading with the Yao people, mainly slaves and ivory, in exchange for clothes and guns. Because of their involvement in this coastal trade they became one of the richest and most influential tribes in Southern Africa. Large Yao kingdoms came into being as mighty Yao chiefs took control of the Niassa province of Mozambique in the 19th century. During that time the Yao began to move from their traditional home in today’s Malawi and Tanzania, which resulted in the Yao populations they now have. The most important result of the great chiefdoms was the turning of the whole nation to Islam around the turn of the 20th century and after the 1st World War. Because of their trade with the Arabs, the Yao chiefs (sultans) needed scribes who could read and write Arabic. The Islam teachers who were employed and lived in the Yao villages, made a significant impact on the Yao people because they could offer them literacy, a holy book, smart clothes and square, instead of round, houses. Furthermore, the Yao sultans strongly resisted the Portuguese, British and German colonial rule, which was viewed as a major threat to them. The British, who were seen as Christians like the Portuguese, tried to stop the slave trade by attacking some of the Yao slave caravans near the coast. They freed the slaves and confiscated the ivory, which the slaves had been transporting. The greater Yao chief Mataka decided that becoming a Christian would have a negative economic impact on his people, while Islam offered them a social system, which would assimilate their traditional culture. Because of the political and ritual domination of the chiefs, their conversion to Islam caused their subjects to do likewise. The Islam, which they have embraced, is not the orthodox religion, but is totally intermingled with their traditional animistic belief system. It is often referred to as Folk Islam.
The Yao in Mozambique
The Yao have lived in northern Mozambique (formerly Portuguese East Africa). A close look at the history of the Yao people of Mozambique as a whole will show that their ethno geographic center is located in a small village called Chiconono, in the northwestern Mozambican province of Niassa. Active as slave traders for the Arabs, they faced social and political decline with the arrival of the Portuguese in today’s Niassa Province, that established the Niassa Company, and settled in the region founding cities and towns, and changing a slave trade economy to a production economy. The expanding Portuguese Empire had established trading posts, forts and ports in East Africa since the 15th century, in direct competition with the diverse influential Muslim political forces: Ottomans, Mughals and Yemeni Sufi orders to a limited extent, and increasingly Ibadi influences from independent Southeastern Arabia. The spice route and the Christian evangelization were the main driving forces behind Portuguese expansion in the region. The Portuguese Empire was by then one of the greatest political and economic powers in the world. Portuguese-run agricultural plantations started to expand offering paid labour to the tribal populations workforce. The Yao had changed its role in local society from slave traders and slave owners to agricultural workers under Portuguese rule. However, the Yao preserved their traditional culture and subsistency agriculture by their own. As Muslims, the Yao could not stand with the Christian populations’ way of life, which however, offered Christian education and taught the Portuguese language to the Muslim ethnic group with little feedback. Currently, there are a minimum estimated 450,000 Yao people living in Mozambique. They largely occupy the eastern and northern part of the Niassa province and form about 40% of the population of Lichinga, the capital of this province.
The Yao outside Mozambique
The Yao moved into what is now the western region of Malawi around the 1830s, when they were active as slave traders for the Swahili Arab slave traders on the coast of Mozambique. Rich in culture, tradition, and music, the Yao are primarily Muslim, and count among their famous progeny a former President of the Republic of Malawi, Bakili Muluzi. The Yao had close ties with the Arabs on the coast during the late 19th century, and adopted some parts of their culture, such as architecture and Islam, but still kept their own national identity. Their close cooperation with the Arabs gave them access to firearms, which gave them an advantage in their many wars against neighbouring peoples, such as the Ngoni and the Chewa. The Yao actively resisted the German forces that were colonizing Southeast Africa (roughly today’s Tanzania, Rwanda, and Burundi). In 1890, King Machemba issued a declaration to Commander von Wissman saying that he was open to trade but not willing to submit authority. After further engagements, the Yao ended up surrendering to German forces.