Ottoman Algeria, formally the Regency of Algiers, was an Ottoman territory centered on Algiers, eventually covering all coastal lands of modern Algeria. It was established in 1525 when Hayreddin Barbarossa captured the city.
The Regency of Algiers was the principal center of Ottoman power in the Maghreb. It was also a base from which attacks were made on European shipping. It rivaled and displaced the Zianids, the Hafsids and the Spanish possessions in northern Africa, and was a major hub of Mediterranean piracy and slave markets, until the French conquest of Algeria in 1830.