The war came at a time characterized by European colonial expansion in Africa. Morocco suffered a massive military defeat against France in the Battle of Isly in 1844, and in 1856 the British pressured the sultan into a trade agreement that opened the ports and reduced the Makhzen's control over Morocco's economy.[1] The Spanish campaign of 1859 came in response to the skirmishes led by local tribes that would take place around the Spanish enclaves.[2] After the Spain's victory over Morocco at the Battle of Tetuan and its conquest of the city in 1860, the Spanish general Leopoldo O'Donnell decided to attack Tangier. The Moroccan army, led by al-Abass Bin Abderrahman, brother of Sultan Muhammad IV, attampted to challenge the attack at Wad Ras, where it suffered a massive defeat.