The French then demanded that Morocco cease its support 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.