His successor, Moulay Isma'il, moved the capital to Meknes, though he did sponsor some major construction projects in Fez. Notably, he completely rebuilt the Zawiya of Moulay Idris II between 1717 and 1720, giving the building most of its present form.[4][26]