Immediately upon ascension to throne in August 1859, Muhammad IV was faced with his first test, the Spanish-Moroccan War (1859) governed by 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 Tetouan. 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 humiliating 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, in southwestern Morocco, to Spain.