The Moroccan sultan Abdelaziz assisted him in building the Ribat, as he sent craftsmen, materials, financing and arms, and also appointed him Caid.