Maimonides's family, along with most other Jews, chose exile. Some say, though, that it is likely that Maimonides feigned a conversion to Islam before escaping. This forced conversion was ruled legally invalid under Islamic law when brought up by a rival in Egypt. For the next ten years, Maimonides moved about in southern Spain, eventually settling in Fez in Morocco. During this time, he composed his acclaimed commentary on the Mishnah, during the years 1166–1168. Some say that his teacher in Fez was Rabbi Yehuda Ha-Cohen Ibn Susan, until he was killed in 1165.