of Abd al-Qadir and cede its eastern frontier lands to French control and, in 1844, launched the First Franco-Moroccan War. The war did not go well for the sultan. The French navy bombarded Mogador (Essaouira) and Tangier, while the Moroccan army, under Abd al-Rahman's son Moulay Muhammad, was defeated by the French at the Battle of Isly in August 1844. Abd al-Rahman consented to the Treaty of Tangier in October 1844, withdrawing support for al-Qadir, and reducing border garrisons. The treaties aggravated the internal situation in Morocco. Abd al-Rahman in fact rejected the Treaty of Lalla Maghnia at first, blaming it on his negotiators, but was eventually forced to ratify it. Army units and rural tribes across the north and east, already basically ungovernable, started raising rebellions which were only crushed with difficulty. The aftermath saw the break between Abd al-Rahman and Abd al-Qadir. Bombardment of Salé (1851) On 25 November 1851, French ships anchored off Rabat and Salé. Moroccan soldiers in those cities prepared to repel the French attack and armed themselves with artillery. At 10:00 a.m, the French fleet opened fire on the forts of Salé, while the Moroccans retaliated instantly with forty batteries of artillery weapons. An hour later, the batteries in Salé were destroyed, while the artillery in Rabat were damaged to the point where they became almost useless, however Moroccan reinforcements arrived. The damaged batteries were removed from the cities by Moroccan forces who continued to resist. By the end of the bombardment, the Moroccans had 18 to 22 men killed and 47 of them wounded, with many fortifications damaged. On the other hand, the French had losses of 4 killed and 18 wounded, as well as two of their battleships damaged. Both sides claimed victory, as the bombardment ended in a French military victory but also in a Moroccan political victory. Wadaya revolt (1831–1834) As a result of the sultan's withdrawal from Tlemcen in March 1831, the Wadaya rebelled in the countryside of Morocco and recognised a relative of the sultan, Mohammed bin al-Tayyib, as sultan. The revolt began in the north and spread throughout Morocco, including the capital Fes, the sultan decided to leave Fes for Meknes which was safer and was protected by the 'Abid al-Bukhari infantry, but on the way to Meknes he was stopped by rebel troops who sent him back to Fes. After the sultan learned about the unpopularity