Relationship between East African tribes and the Middle East was through trade and began as far back as 200 BC.
Arab traders from the Middle East in their sea travels became aware of availability of such goods as ivory, gold and animal skins in East Africa coastal areas and were thus attracted by these goods. They were accepted by the local people along the coast and a trading relationship was born between them and the locals.
Unfortunately , the Arabs later began the despicable act of slave trade.
During this period, constant warfare in the Middle East especially Persia made the Arabs flee to East Africa because their survival depended on trade. This further cemented their relationship with East African tribes.