Admiral Duperré commanded an armada of 600 ships that originated from Toulon, leading it to Algiers. Using Napoleon's 1808 contingency plan for the invasion of Algeria, General de Bourmont then landed west of Algiers, at Sidi Ferruch on 14 June 1830, with 34,000 soldiers. In response to the French, the Algerian dey ordered an opposition consisting of 7,000 janissaries, 19,000 troops from the beys of Constantine and Oran, and about 17,000 Kabyles. The French established a strong beachhead and pushed toward Algiers, thanks in part to superior artillery and better organization. The French troops took the advantage on 19 June during the battle of Staouéli, and entered Algiers on 5 July after a three-week campaign. The dey agreed to surrender in exchange for his freedom and the offer to retain possession of his personal wealth. Five days later, he exiled himself with his family, departing on a French ship for the Italian peninsula. 2,500 janissaries also quit the Algerian territories, heading for Asia, on 11 July. The dey's departure ended 313 years of Ottoman rule of the territory.