In 1554, the kingdom of Tlemcen came under Ottoman rule, which deposed the Saadi Moroccan rule, but the Moroccans restored it in 1556. The Ottomans were fighting a naval war against the Spaniards across the Mediterranean, and the Kingdom of Tlemcen became another vassal of the Sultan in Constantinople. Tlemcen and the Algerian provinces regained effective independence in their own affairs in 1671, although Tlemcen was no longer a government seat as before. The Spanish were evicted from Oran in 1792, but thirty years later they were replaced by the French, who seized Algiers. A French fleet bombarded Algiers in 1830, at which point the dey capitulated to French colonial rule; a broad coalition of natives continued to resist, coordinated loosely at Tlemcen. The great Berber leader Abd al-Kader, fought with incredible skill and valor, but his defeat in 1844 at Battle of Isly ended the dream of a new independent Algeria.