Others regard the first mosque in history to be the Quba Mosque in present-day Medina since it was the first structure built by Muhammad upon his emigration from Mecca in 622, though the Mosque of the Companions in the Eritrean city of Massawa may have been constructed at around the same time.