In 1320 Sultan Abu Sa'id built a madrasa near the mosque, known as the Madrasa Fes Jdid or Madrasa Dar al-Makhzen, however it was never able to compete with the prestige of the madrasas in Fes el-Bali and was later absorbed by the expanding Royal Palace.[1]:69[7]:114 Sultan Abu Inan is widely believed to have been buried in a tomb adjoining the mosque upon his death in 1358, although this is not fully confirmed.[3][4] Abu Inan's burial here marked a shift in the choice of burial sites of the Marinid sultans.