Islam came to the East African coast around 1012 AD , when the traders from the Persian Gulf and the Arabian Peninsula continued to journey to these parts during monsoon seasons and to have contact with the local people through trade , marriage , and an exchange of ideas . Islam established its presence in the East African coast from around 1012 AD , when the traders from the Persian Gulf and the Arabian Peninsula continued to journey to these parts during monsoon seasons and to interact with the local people through trade , intermarriage , and an exchange of ideas .