The French conquest of Algeria (French: Conquête de l'Algérie par la France; Arabic: الغزو الفرنسي للجزائر) took place between 1830 and 1847. In 1827, an argument between Hussein Dey, the ruler of the Regency of Algiers, and the French consul escalated into a blockade, following which the Kingdom of France invaded Algiers in 1830, and seized other coastal communities. Amid internal political strife in France, decisions were repeatedly taken to retain control of the territory, and additional military forces were brought in over the following years to quell resistance in the interior of the country. Although the conquest of Algeria largely ended by 1847, shortly before its formal annexation by France, it was not until 1903 that France fully secured its colonial borders, incorporating the Saharan south.
Initially, the Algerian resistance was mainly divided between forces under Ahmed Bey at Constantine, seeking to reinstate the Regency of Algiers, primarily in the east, and nationalist forces in the west and center. Treaties with the nationalists under Emir Abdelkader enabled the French to first focus on the elimination of the remnants of the Deylik, achieved with the 1837 siege of Constantine. Abdelkader continued to wage stiff resistance in the west. Finally driven into Morocco in 1842, by large-scale and heavy-handed French military action, he continued to wage a guerrilla war until the Moroccan government, under French diplomatic pressure following its defeat in the Franco-Moroccan War, attacked him and drove him out of Morocco. He surrendered to French forces in 1847. Various governments and scholars have considered France's conquest of Algeria as constituting a genocide.