Husseyn Dey succeeded Ali V ben Ahmed as Ottoman provincial ruler, or dey, of Algiers in March 1818. In order to reassure the Europeans he enacted some liberal measures such as freeing hostages and ensuring freedom of religion for the Jews.
The French conquest of Algeria
In an attempt by Charles X of France to increase his popularity amongst the French people, he sought to bolster patriotic sentiment, and turn eyes away from his domestic policies, by "skirmishing against the dey". This eventually lead to the French conquest of Algeria.
The Fly Whisk Incident
In the 1790s, France had contracted to purchase wheat for the French army from two Jewish merchants in Algiers, Messrs. Bacri and Boushnak, and was in arrears paying them. These merchants had themselves debts to the dey and claimed inability to pay those debts until France paid its debts to them. The dey had unsuccessfully negotiated with Pierre Deval, the French consul, to rectify this situation, and he suspected Deval of collaborating with the merchants against him, especially when the French government made no provisions for repaying the merchants in 1820. Deval's nephew Alexandre, the consul in Bône, further angered the dey by fortifying French storehouses in Bône and La Calle against the terms of prior agreements.
After a contentious meeting in which Deval refused to provide satisfactory answers on 29 April 1827, the dey struck Deval with his fly whisk. Charles X used this slight against his diplomatic representative to first demand an apology from the dey, and then to initiate a blockade against the port of Algiers. When the dey responded to a demand to send an ambassador to France to resolve the incident with cannon fire directed toward one of the blockading ships, the French determined that more forceful action was required.
Invasion of Algiers (June 1830)
34 000 French soldiers landed at Sidi Ferruch 27 kilometres (17 mi) west of Algiers on June 14, 1830 and entered Algiers on 5 July after a three-week campaign against the Ottoman forces. Hussein Dey agreed to surrender in exchange for his freedom and the offer to retain possession of his personal wealth. This marked the end of 313 years of Ottoman rule of the territory and the start of French rule in Algeria.
On July 15, 1830, five days after his surrender to the French, Husseyn Dey left Algiers with his family, his harem and his personal fortune on the French ship Jeanne d'Arc. His request for permission to live in France having been refused by Charles X, he settled in Naples which was under the control of the Austrian Empire. He stayed in Italy for three years and died in Alexandria in 1838.