Early reign The new sultan did not outwardly resemble a modernizer. yet he was engaged with contemporary reformist ideas and was aware of the technological development elsewhere in the region.
Hispano-Moroccan War Immediately upon ascension to throne in August 1859, Muhammad IV was faced with his first test, the
Spanish-Moroccan War under
Isabella II of Spain. Raids by irregular tribesmen on the Spanish enclaves of
Ceuta and
Melilla in northwest Morocco prompted
Spain to demand an expansion of the borders of its enclave around Ceuta. When this was refused by Muhammad IV, Spain declared war. The Spanish navy bombarded
Tangier,
Asilah and
Tetuan. A large Spanish expeditionary force landed in Ceuta, which subsequently went on to defeat the Moroccan army at the
Battle of Tétouan in February 1860. The
Treaty of Wad Ras signed in April 1860 expanded the enclaves, but more worrisomely imposed a large indemnity payment on Morocco of 100 million francs, twenty times the government's budget. Provisions allowed the Spanish to hold
Tetouan until it was paid. The treaty also ceded the enclave of
Sidi Ifni to Spain.
Aftermath After the disappointment of defeat and the crushing financial burden of the Spanish treaty, Muhammad IV gradually retired into passivity, dedicating himself to scholarly and intellectual interests in mathematics, geometry, astronomy, poetry and music, and leaving political affairs to be handled by his palace slave and effective
vizier,
Si Moussa. 1281 (April 20, 1865).As by the Treaty of Tangier in 1863, 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, refusing to ratify their credentials, and instead appointed
qaids 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. coin (1873). Minted by Mohammed IV
Reform Following the military defeats at Isly and Tetuan, a new Moroccan army was introduced, ''
'Askar Nizami.'' Well-equipped infantry were created, along with modern artillery. A steam engine was built in the palace in
Marrakesh in 1863, and the first state-sponsored
printing press was introduced to Morocco in 1865. By 1868, over 3,000 books, mostly religious instructions, were printed on the lithographic press in
Fes. The 'Askar Nizami was subsequently reconstituted by Muhammad IV, who equipped the army with up-to-date weapons supplied by a munitions factory in Marrakesh. A military training school was built at
Dar al-Makhzen in Fes, and he searched for Muslim military instructors from
Algiers and
Tunis to train the new army, rather than Europeans. Muhammad IV's reforms were met with minimal opposition from the
Ulama. == Death ==