According to history we understand that Prophet Mohammed was denied the acceptance by his fellow citizens of his prophecy and education. In fact he was persecuted and his followers were forced to seek refuge elsewhere. And their destination happens to the other side of the Red Sea, the current Eritrea. Here they were very well come by the ruler of the Bahri Negash.
At their arrival to the Red Sea shore in Eritrea and being most welcome by the people they had to build a Mosque in which they could pray. They build a small Mosque and name it Al-Sahaba Mosque. Sahaba is in Arabic meaning disciple and that is to imply that Al-Sahaba Mosque was built by the disciples of Prophet Mohammed. And that makes the Mosque the first in Africa. It was built 1400 AD.
The Mosque being the first one in Africa was built with Islamic architecture and is still intact.
Al-Shafi e Mosque is also another ancient Mosque built before 1000 years by people who were the first to go for pilgrimage to Mecca. The Mosque is built with Islamic architecture. Al-Sheik Hammal, whose architectural design can be seen in many parts of the Horn region, was built before 800 years.