As by treaty, half of the customs duties of all Moroccan ports were designated to pay the Spanish debt, the Alawite sultan's government (the "Makhzen") was faced with a critical financial situation, and launched the process of "qaidization". Traditionally, the Makhzen had an understanding with the semi-autonomous rural tribes, whereby the tribal leaders agreed to hand over a portion of the taxes they collected and to supply tribesmen to the sultan's army in times of war, but otherwise were left to manage their own affairs. The new financial difficulties from the colonial encroachment prompted the Makhzen to demand ever-greater exactions of troops and taxes from the tribes. As the tribes balked and began to refuse the higher taxes, the sultan decided to circumvent the elected tribal leaders ("amghars"), refusing to ratify their credentials, and instead appointed "qaids" (lords) of his own choosing, imposing them upon the tribes. The qaids were rarely of the same tribal stock as the tribes they governed, but were instead ambitious men, chosen primarily for their ruthless ability to crush rebellion and force the tribes to cough up. Initially designed as a centralizing move, this eventually backfired, as the qaids, once esconsed in their tribal fiefs, proved even more ungovernable than the amghars had ever been. During Muhammad IV's reign, Morocco began essentially careening into feudalism, a process that accelerated during the reign of his successor, Hassan I.