When Maimonides was thirteen years old, the Almohads took Cordoba away from the Almoravid dynasty. The Almohads were Muslims who were conquering Al-Andalus (Muslim Spain). They forced all non-Muslims to leave, change their religion to Islam, or be killed. This forced Maimonides' family to leave Cordoba. They spent twelve years traveling and looking for a home. During these years, he wrote the commentary on the Mishnah. Finally, his family settled in Cairo, Egypt. In 1166, Maimonides' father died and his brother drowned on a shipwreck in the Indian Ocean. 