The most serious foreign threat to Morocco, however, was France, which had launched its invasion of neighboring Algeria in 1830. Abd al-Rahman sent Moroccan troops to defend Tlemcen in 1830, but they were thrown back and Tlemcen was captured by the French in 1832. Abd al-Rahman supported the continued guerrilla resistance in Algeria led by Abd al-Qadir al-Jaza'iri who was in theory, a vassal of the Moroccan sultan, albeit only tentatively, not wishing to incur French retaliation. But the border tribes of Morocco continued supporting Abd al-Qadir more actively, prompting the French launch their own strikes over the border and establishing forward outposts in Moroccan territory, which only inflamed the reaction in Morocco and increased the irregular border war. The Moroccan army attacked a French military group which France considered a declaration of war. After learning that the Sultan had sent huge forces to the eastern front, Peugeot gave Morocco a deadline of eight days to withdraw its armies from the east, but the Sultan was not convinced.