Led by Abd el-Krim, the independent Republic of the Rif existed from 1921 to 1926, based in the central part of the Rif (in the Spanish Protectorate), while also extending, for some months, to some parts of the tribal lands of the Ghomara, the Eastern Rif, Jbala, the Ouergha valley and the north of Taza. After proclaiming independence on 18 September 1921, the polity developed state and governing institutions such as tax collection, law enforcement and the organisation of an army. However, since 1925 the Spanish and French troops managed to quell the resistance and Abd el-Krim surrendered in May 1926.