The first wave of migration was by Southern Cushitic speakers who moved south from Ethiopia and Somalia into Tanzania. They are ancestral to the Iraqw, Gorowa, and Burunge. Based on linguistic evidence, there may also have been two movements into Tanzania of Eastern Cushitic people at about 4,000 and 2,000 years ago, originating from north of Lake Turkana.
Archaeological evidence supports the conclusion that Southern Nilotes, including the Datoog, moved south from the present-day South Sudan / Ethiopia border region into central northern Tanzania between 2,900 and 2,400 years ago.
These movements took place at approximately the same time as the settlement of the iron-making Mashariki Bantu from West Africa in the Lake Victoria and Lake Tanganyika areas. They brought with them the west African planting tradition and the primary staple of yams. They subsequently migrated out of these regions across the rest of Tanzania between 2,300 and 1,700 years ago.
The people of Tanzania have been associated with the production of iron and steel. The Pare people were the main producers of sought-after iron for peoples who occupied the mountain regions of north-eastern Tanzania. The Haya people on the western shores of Lake Victoria invented a type of high-heat blast furnace, which allowed them to forge carbon steel at temperatures exceeding 1,820 °C (3,310 °F) more than 1,500 years ago.
Travelers and merchants from the Persian Gulf and India have visited the east African coast since early in the first millennium AD. Islam was practized by some on the Swahili Coast as early as the eighth or ninth century A.D.
Bantu-speakers built farming and trade villages along the Tanzanian coast from the outset of the first millennium. Archaeological finds at Fukuchani, on the north-west coast of Zanzibar, indicate a settled agricultural and fishing community from the 6th century CE at the latest. The considerable amount of daub found indicates timber buildings, and shell beads, bead grinders, and iron slag have been found at the site. There is evidence for limited engagement in long-distance trade: a small amount of imported pottery has been found, less than 1% of total pottery finds, mostly from the Gulf and dated to the 5th to 8th century. The similarity to contemporary sites such as Mkokotoni and Dar es Salaam indicate a unified group of communities that developed into the first center of coastal maritime culture. The coastal towns appear to have been engaged in Indian Ocean and inland African trade at this early period. Trade rapidly increased in importance and quantity beginning in the mid-8th century and by the close of the 10th century Zanzibar was one of the central Swahili trading towns.
Growth in Egyptian and Persian shipping from the Red Sea and the Persian Gulf revitalized Indian Ocean trade, particularly after the Fatimid Caliphate relocated to Fustat (Cairo). Swahili agriculturalists built increasingly dense settlements to tap into trade, these forming the earliest Swahili city-states. The Venda-Shona Kingdoms of Mapungubwe and Zimbabwe in South Africa and Zimbabwe, respectively, became a major producer of gold around this same period. Economic, social, and religious power was increasingly vested in Kilwa, Tanzania’s major medieval city-state. Kilwa controlled a number of smaller ports stretching down to modern-day Mozambique. Sofala became the major gold emporium and Kilwa grew rich off the trade, lying at the southern end of the Indian Ocean Monsoons. Kilwa’s major rivals lay to the north, in modern-day Kenya, namely Mombasa and Malindi. Kilwa remained the major power in East Africa until the arrival of the Portuguese at the end of the 15th century.