Over the summer of 1893 a period of renewed agitation by the locals enabled García y Magallo to secure the funds for the expansion of fortifications surrounding the city.
After a period of escalating violence the war began in earnest on October 3 when 6,000 Riffian warriors armed with Remington rifles descended from the mountains and attacked the city's garrison of 400 regular infantry.
Although a civilian corps was organized to aid in the defence, the weight of the attackers, whose ranks were swelled by tribesmen from the hills, compelled the last of the defenders to retire to the fortress.
For the first time, Spanish soldiers wielded their formidable 7 mm Mauser Model 1893's, made famous a few years later at the Battle of San Juan Hill.
The government dispatched the ironclad Numancia and two gunboats stationed at Málaga, put the fleet on alert, and mobilized the Army of Andalusia for service abroad.
The troops mobilizing to bolster Melilla's garrison, initially numbering about 3,000, received in many cities ceremonies and ovations from the populace as they moved to the ports.
However, his reluctance to cooperate in pacifying his own subjects infuriated the Spanish government and people, who found themselves committed to military operations far exceeding their modest financial resources, on account, they believed, of Moroccan negligence.
Juan García y Magallo, Governor of Melilla and commander of the Spanish forces, issued an ineffective ultimatum while the Sultan dispatched a contingent of regular troops under Baja-el-Arbi to restore the situation, without success.
The Riffians in the trenches numbered about 3,000 men; both sides fought with courage but the Rif warriors held the line while their main body flocked 6,000 reinforcements to the battle.
News of the disaster, coupled with Ortega's telegrams, convinced the Cabinet to send out an additional three regiments of cavalry and four battalions of infantry that day.
Spanish retaliation often took gruesome turns: convicts and penal labourers were assembled into search and destroy units led by army officers and crept out into the night to ambush Rif patrols.
With the arrival of the armoured cruisers Alfonso XII and Isla de Luzon, Spain began to apply its naval power to full effect, subjecting the Rif to incessant and untiring bombardment from the coast.
In April 1894, Martínez de Campos was appointed Ambassador to Morocco in addition to his military command, and negotiated peace directly with the Sultan.
Spain, however, was largely uninterested in an African empire and cautious not to break treaties with the United Kingdom (which viewed any acquisition of territory along the Straits of Gibraltar with alarm).