In 1045, Alfasi moved to Fez with his wife and two children. (However, Binyamin Ze'ev Benedict and other recent scholars argue that Alfasi was never active in Fez.) Fes' Jewish community undertook to support him and his family so that he could work on his "Sefer Ha-halachot" undisturbed. They also founded a yeshiva in his honor, and many students throughout Morocco came to study under his guidance. The most famous of his many students is Rabbi Judah Halevi, author of the Kuzari; he also taught Rabbi Joseph ibn Migash (the "Ri Migash"), who was in turn a teacher of Rabbi Maimon, father and teacher of Maimonides "(Rambam)".