In the 1830s the French controlled only the northern part of the country. Entering the Oran region, they faced resistance from Emir Abd al-Kader, a leader of a Sufi Brotherhood. In 1839 Abd al-Kader began a seven-year war by declaring jihad against the French. The French signed two peace treaties with Al-Kader, but they were broken because of a miscommunication between the military and the government in Paris. In response to the breaking of the second treaty, Abd al-Kader drove the French to the coast. In reply, a force of nearly 100,000 troops marched to the Algerian countryside and forced Abd al-Kader's surrender in 1847.