When the French realized that nationalists were close to Sultan Mohammed ben Youssef, they dethroned him and replaced him with his cousin Mohammed Ben Arafa. The latter remained sultan for two years before being banned from living in Morocco.