# Regency of Algiers

The Regency of Algiers was an early modern semi-independent Ottoman province and nominal vassal state on the Barbary Coast of North Africa from 1516 to 1830. Founded by the privateer brothers Aruj and Hayreddin Reis (also known as the Barbarossa brothers), the Regency succeeded the Kingdom of Tlemcen as an infamous and formidable base that waged maritime holy war on European Christian powers. Elected regents headed a stratocracy that haunted European imagination for three centuries but still gained recognition as a regional power.
The Regency emerged in the 16th-century Ottoman–Habsburg wars. As self-proclaimed ghazis gaining popular support and legitimacy from the religious leaders at the expense of hostile local emirs, the Barbarossa brothers and their successors carved a unique corsair state that drew revenue and political power from its naval warfare against Habsburg Spain. In the 17th century, when the wars between Spain and the Ottoman Empire, Kingdom of France, Kingdom of England and Dutch Republic ended, Barbary corsairs started capturing merchant ships and their crews and goods from these states. When the Ottomans could not prevent these attacks, European powers negotiated directly with Algiers and also took military action against it. This policy would emancipate Algiers from the Ottomans.
The Regency held significant naval power in the 16th and 17th centuries and well into the end of the Napoleonic wars despite European naval superiority. Its institutionalised privateering dealt substantial damage to European shipping, took captives for ransom, plundered booty, hijacked ships and eventually demanded regular tribute payments. In the rich and bustling city of Algiers, the Barbary slave trade reached an apex. The Regency also expanded its hold in the interior by allowing a large degree of autonomy to the tribal communities. After the janissary coup of 1659, the Regency became a sovereign military republic, and its rulers were thenceforth elected by the council known as the diwan rather than appointed by the Ottoman sultan previously.
Despite wars over territory with Spain and the Maghrebi states in the 18th century, Mediterranean trade and diplomatic relations with European states expanded, as wheat exports secured Algerian revenues after privateering decline. Bureaucratisation efforts stabilized the Regency's government, allowing into office regents such as Mohammed ben-Osman, who maintained Algerian prestige thanks to his public and defensive works. Increased Algerian privateering and demands for tribute started the Barbary Wars at the beginning of the 19th century, when Algiers was decisively defeated for the first time. Internal central authority weakened in Algiers due to political intrigue, failed harvests and the decline of privateering. Violent tribal revolts followed, mainly led by maraboutic orders such as the Darqawis and Tijanis. In 1830, France took advantage of this domestic turmoil to invade. The resulting French conquest of Algeria led to colonial rule until 1962.

## Names

In the historiography of the Regency of Algiers, it has been called the "Kingdom of Algiers", "Republic of Algiers", "State of Algiers", "State of the Algerians", "State of the Turks of Algiers" and "Ottoman Algeria".
The current states of Algeria, Tunisia and Libya go back to the three regencies of the 16th century: Algiers, Tunis and Tripoli. Algiers became the capital of its state and this term in the international acts applied to both the city and the country which it ordered: الجزائر (El-Djazâ'ir). However a distinction was made in the spoken language between on the one hand El-Djazâ'ir, the space which was neither the Sultanate of Morocco, nor the regency of Tunis, and on the other hand, the city commonly designated by the contraction دزاير (Dzayer) or in a more classic register الجزائر العاصمة (El-Djazâ'ir El 'âçima lit. 'Algiers the Capital'). The Regency, which lasted over three centuries, formed a political entity that covered what Arab geographers designate as المغرب الأوسط (El-Maghrib El-Awsat, lit. 'Central Maghreb'), establishing the Algerian وطن الجزائر (Watan el-Djazâïr, lit. 'Country of Algiers') and the definition of its borders with its neighbors to the east and west.
In European languages, El-Djazâïr became Alger, Argel, Algiers, Algeria, etc. In English, a progressive distinction was made between Algiers, the city, and Algeria, the country, whereas in French, Algiers designated both the city and the country, under the forms of "Kingdom of Algiers" or "Republic of Algiers". Algériens (lit. 'Algerians') as a demonym is attested to in writing in French as early as 1613 and its use has been constant since that date. Meanwhile, in the English lexicology of that time, Algerian is "Algerine", which referred to the political entity that later became Algeria.

## History
### Establishment (1512–1533)

Encouraged by the political disintegration of the Maghrebi Muslim states and fearing an alliance between the Moriscos (exiled Spanish Muslims) and the Egyptian Mamluk Sultanate, the Spanish Empire captured several cities and established walled and garrisoned strongpoints called presidios in North Africa. The Spanish conquered the city of Oran from the Zayyanids, as well as Béjaïa from the Hafsids in 1509, then Tripoli from the Hafsids in 1510, making other coastal cities submit to them, including Algiers, where they built an island fortress known as the Peñón of Algiers. In addition to territorial ambitions and Catholic missionary fervor, the gold and slave trades funded the Spanish treasury, as Spain controlled the caravan trade routes passing through the central Maghreb.

#### Barbarossa brothers

After operating as Hafsid-sponsored privateers from their base in the island of Djerba, Mytilene-born brothers Aruj and Hayreddin Reis, nicknamed the Barbarossa brothers, came to the central Maghreb at the request of Béjaïa citizens in 1512. They failed to take the city from the Spanish twice, but the citizens of Jijel offered to make Aruj king after his corsairs arrived with a shipload of wheat during a famine. Answering pleas for help from its inhabitants, the brothers captured Algiers in 1516 but failed to destroy the Peñón. Aruj executed the Algerian emir, Salim Al-Toumi [fr], then proclaimed himself Sultan of Algiers. In October 1516, Aruj repelled an attack led by the Spanish commander Don Diego de Vera, which won him the allegiance of people in the northern part of central Algeria.
In the central Maghreb, Aruj built a powerful Muslim state at the expense of quarrelling principalities. He sought the support of the local religious Muslim (maraboutic and Sufi) orders, while his absolute authority was backed by his Turkish and Christian renegade corsairs. The latter were European converts to Islam, known in Europe as "turned Turks". "Aruj [Reis] effectively began the powerful greatness of Algiers and the Barbary", wrote Diego de Haedo [fr; es; it], a Spanish Benedictine held captive in Algiers between 1577 and 1580.
Aruj continued his conquests in western central Maghreb. He won the Battle of Oued Djer against Spanish vassal Hamid bin Abid, the prince of Ténès, in June 1517 and took his city. While Aruj was there, a delegation arrived from Tlemcen to complain about the growing Spanish threat, exacerbated by squabbling between the Zayyanid princes over the throne. Abu Hammou III [fr] had seized power in Tlemcen and imprisoned his nephew Abu Zayan III [fr]. According to the historian Yahya Boaziz, Aruj and his troops entered Tlemcen in 1518, released Abu Zayan from prison and restored him to his throne before executing him for conspiring with the Spanish against Aruj. However, the French historian Charles-André Julien claims that Aruj took power for himself against his promise to release Abu Zayan. Meanwhile, the deposed Abu Hammou III fled to Oran to beg the Spaniards to help him retake his throne. The Spaniards chose to do so; they cut Aruj's supply route from Algiers, then began a siege of Tlemcen that lasted six months. Aruj locked himself inside the Mechouar palace for several days to avoid an increasingly hostile populace, who opened the gates for the Spanish in May 1518. Aruj attempted to flee Tlemcen, but the Spaniards pursued and killed him along with his Turkish companions.
Hayreddin inherited his brother's position as sultan without opposition, although he faced threats from the Spanish, Zayyanids, Hafsids and neighboring tribes. After repelling another Spanish attack in August 1519, led by the Spanish viceroy of Sicily Hugo of Moncada, Hayreddin pledged allegiance to the central Ottoman government, known as the Sublime Porte, to obtain Ottoman support against his foes. In October 1519, a delegation of Algerian dignitaries and Muslim jurists went to Ottoman Sultan Selim I, proposing that Algiers join the Ottoman Empire. After initial reluctance, the sultan recognized Hayreddin as pasha—a regent with the title of beylerbey (lit. 'Prince of princes')—and sent him 2,000 janissaries, who formed a privileged military corps. Algiers officially became an eyalet (lit. 'province') under Selim's successor Suleiman I in the spring of 1521. From this year onward, the Ottoman sultans appointed Algerian corsair captains as beylerbeys. In European sources, Algiers was called "the Regency". Some historians refer to Algiers in this period as an Ottoman vassal state, state-province or Kingdom-province. The historian Lamnouar Merouche stresses that Algiers had all the attributes of a state while being an integral part of the Ottoman Empire, calling it "Etat d'empire" (lit. 'Imperial state').
Hayreddin had to return to Jijel after a coalition of the Hafsids with the Kabyle kingdom of Kuku blockaded Algiers and took it in 1520. To gain legitimacy among the local tribes, he and his men used their reputation as "holy warriors". They gathered support from the Kabyle kingdom of Beni Abbas, a rival of Kuku. Hayreddin retook Algiers in 1525 after defeating the prince and founder of Kuku, Ahmad ibn al-Kadi, and then destroyed the Peñón of Algiers in 1529. Hayreddin used its rubble to build Algiers's harbour, making it the headquarters of the Algerian corsair fleet. Hayreddin established the military structure of the Regency, formalising an institution known as the taife reisi (lit. 'Corsair captains' group'). It would become the model for Barbary corsairs in Tunis, Tripoli and the Republic of Salé in the 17th century. He conducted several raids on Spanish coasts and vanquished the Genoese fleet of Andrea Doria at Cherchell in 1531. Hayreddin also rescued over 70,000 Andalusi refugees from the Spanish inquisition and brought them to Algeria, where they contributed to the flourishing culture of the Regency.
The Barbarossa brothers turned the city of Algiers into an Islamic bastion against Catholic Spain in the western Mediterranean, making it the capital of what would become the early modern Algerian state. The Sultan called Hayreddin to the Porte to appoint him as Kapudan Pasha (grand admiral of the Ottoman fleet) in 1533. Before departing, Hayreddin named Sardinian renegade Hasan Agha his deputy in Algiers.

### Beylerbeylik period (1533–1587)

The beylerbeys of Algiers were usually strongmen who kept most of the Maghreb firmly under Ottoman control, garrisoning the main towns with troops and collecting taxes on land while relying heavily on privateering at sea. Assisted by a council of government, they took care to respect local institutions and customs under their dominion. Because of their experience in fleet command, some beylerbeys became Kapudan Pasha and led the Ottoman expansion in the Mediterranean.
For most of the 16th century, the beylerbeys acted as independent sovereigns despite acknowledging the suzerainty of the Ottoman sultan, who gave them a free hand but expected Algerian ships to help enforce Ottoman foreign policy if required. However, the interests of Algiers and Constantinople eventually diverged on the matter of privateering, over which the Sublime Porte had no control. Algerian beylerbeys often remained in power for several years and exercised authority over Tunis and Tripoli as well. In addition, the timar system that granted fertile land to Ottoman elite sipahi cavalrymen was not applied in Algiers; instead, the beylerbeys sent tribute to Constantinople every year after paying off the expenses of the Regency.

#### Algerian expansion

The foreign policy of Algiers aligned completely with the Ottoman Empire. Under Hasan Agha, Algiers repelled a naval attack led by Holy Roman Emperor Charles V in October 1541. The victory over the Spaniards was seen by the local population as a divine mandate for the Ottoman rule. Hasan Agha subjugated Kuku in the east in 1542, extended his rule south to Biskra, and gained Tlemcen's support in the west. The Spanish defeat made Algiers the center of piracy, attracting pirates from all over the Mediterranean. The city became a bazaar for thousands of captured Christian slaves. British historian Matthew Carr points out that Algiers was known in Christian Europe as "the scourge of Christendom", while he described it as "a kind of 16th-century rogue state".
Hayreddin's son Hasan Pasha succeeded Hasan Agha in 1544. He repulsed Spanish attacks on western Algeria before Saadian Morocco invaded Tlemcen with 30,000 men in 1551. Hasan Pasha's general Hasan Corso, a Corsican renegade, decisively defeated the Saadians in the Chelif valley and removed them from Tlemcen. He installed an Ottoman governor there and officially ended the Zayyanid dynasty. Hasan Pasha was recalled later that year by Sultan Suleiman, who sent a letter to the Saadian Sultan Mohammed al-Shaykh, deploring the war among Muslim neighbors and asking him to recognize Ottoman suzerainty and cooperate with the newly appointed Beylerbey Salah Reis, a distinguished former subordinate of Hayreddin Reis. Salah Reis expanded his rule to the Berber Beni Djallab's principalities in Touggourt and Ouargla, making them tributaries until 1830. He sent an embassy to Morocco led by Imam Muhammad al-Kharrubi in 1552 to sign a peace treaty which would demarcate the borders between Ottoman Algeria and Saadian Morocco at the Moulouya river. Responding to renewed attacks from the Spanish-allied Saadians, Salah Reis advanced as far as the Moroccan capital of Fez in January 1554, installing the Saadians' opponent Abu Hassun as an Ottoman vassal there. However, the Saadians soon ousted him from Fez in September 1554.
In 1555, Salah Reis captured Béjaïa from the Spanish. After his death, Sultan Suleiman, wary of Algiers’ growing autonomy, recalled its galleys to the Bosphorus in 1556, disrupting plans to besiege Oran. This provoked a Janissary rebellion supporting Hasan Corso, who rejected the authority of the Ottoman-appointed pasha, Mehmed Tekerli, and declared Algiers independent from the Ottoman Empire. Although the pasha murdered Hasan Corso with the corsairs' support, the Janissaries killed him in retribution. The subsequent instability prompted the sultan to restore order by sending Hasan Pasha back to Algiers. He chased the invading Saadians out of Tlemcen again and had Mohammed al-Shaykh assassinated by Ottoman agents feigning to be deserters in October 1557. Hasan Pasha also thwarted the expedition to Mostaganem of the Spanish governor of Oran, Count Alcaudete, in 1558. These military successes ended both Spanish and Moroccan territorial claims in Algiers. After a failed attempt to conquer Oran in 1563 and the Ottoman defeat in the Grand Siege of Malta in 1565, Hasan Pasha was appointed Kapudan Pasha by Suleiman's successor Selim II and replaced with Muhammed I Pasha, son of Salah Reis, who ruled Algiers for only two years.
The last beylerbey of Algiers was Calabrian-born corsair Uluj Ali Pasha. He captured Tunis from Spain's Hafsid vassals in 1569, before losing it to the Christian forces under Spanish commander John of Austria in 1573, who left 8,000 men in the Spanish presidio of La Goletta. Uluj Ali recaptured the city in 1574, while his ships saved the Ottoman fleet from total defeat by the Catholic Holy League in the battle of Lepanto in 1571. Sultan Selim II rewarded him with the title of Kapudan Pasha. Uluj Ali rebuilt the Ottoman fleet, which would count 200 vessels and would be manned by North African sailors, all while retaining his nominal position of beylerbey.
Uluj Ali's deputy Caïd Ramdan [fr] captured Fez in 1576 after defeating the Saadian ruler Mohammed II and put Mohammed's kinsman Abd al-Malik on the throne as an Ottoman vassal. In 1578 another deputy of Uluj Ali, Hassan Veneziano, led his troops deep into the Sahara to the oases of Tuat in central Algeria in response to pleas from its inhabitants for help against Saadi-allied tribes from Tafilalt. A campaign against Morocco led by Uluj Ali was aborted in 1581, as the Saadian ruler al-Mansur had at first vehemently refused to serve under Selim II's successor Murad III, but agreed to pay annual tribute afterwards. Nonetheless, the Figuig oases in the south western Maghreb were part of the Regency by 1584. Veneziano's privateers ravaged the Mediterranean and made the waters unsafe from Andalusia to Sicily. Their power reached as far as the Canary Islands.

### Pashalik period (1587–1659)

Fearful of the growing authority of the beylerbeys, the Sublime Porte replaced it with pashas who served a three-year term starting in 1587. The Ottomans also divided the Maghreb into the three regencies of Algiers, Tunis and Tripoli. The first pashas, such as Khider Pasha [fr] and Kose Mustafa Pasha [fr], served for multiple but separate terms, which guaranteed stability. From the mid-17th century, pashas were isolated and deprived of local support, as they were constantly torn between the demands of the two local ruling factions, the reis (lit. 'corsair captains') and janissaries. The corsair captains were effectively outside the pashas' control, and the janissaries' loyalty to them depended on their ability to collect taxes and meet payroll. Both groups sometimes refused orders from the sultan, or even sent the pashas appointed by the sultan back to Constantinople.

#### Janissary insubordination

Algiers was the headquarters of probably the largest janissary force in the empire outside Constantinople, counting 22,000 soldiers by the mid-17th century. According to the Turkish historian Yılmaz Öztuna, the janissary corps in Algiers, known as the Odjak, was distinct from the janissary garrison in Constantinople. Its members were not devshirme (Christian boys raised as Janissaries) but young men from western Anatolia. The Algerian Janissary Agha maintained representatives in Izmir, Antalya, and Constantinople, who recruited volunteers interested in serving in Algiers. Upon arrival, these recruits joined an orta (janissary company) and underwent three years of training to become "naval soldiers". This janissary corps cultivated a strong sense of elitism among its recruits, who were immediately made to feel like they wielded significant influence over the government of the Regency. This sense of belonging incentivized them to protect and sustain the state, as its political stability and economic success directly benefited them. Politically, they viewed the state as their own domain, and economically, its prosperity translated into personal gain.
After Veneziano, the janissary corps grew stronger and more influential, challenging the corsairs for power. In 1596, Khider Pasha led a revolt in Algiers in an effort to subdue the janissaries with help from Kabyles and Koulouglis—offspring of mixed marriages between Ottoman men and local women and having blood ties to the great indigenous families. Although the revolt spread to neighboring towns, it ultimately failed. The Koulouglis failed to start another coup against the janissaries, which won the janissaries sole power in Algiers.
In the 16th century, France signed capitulation treaties with the Ottomans that gave the French trading privileges in Algiers, which had differences with Constantinople regarding relations with France. The French built a trading center known as the Bastion de France in the city of El Kala in eastern Algeria, which exported coral legally under its monopoly and wheat illegally. As the Bastion was fortified and turned into a military supply base and a center of espionage, Khider Pasha destroyed it in 1604. The Ottoman Porte had him assassinated and replaced by the more compliant Mohammed Koucha [fr] Pasha, but the janissaries revolted in 1606 and tortured him to death. The janissary council, known as the diwan, challenged the pashas' authority by taking charge of the treasury and foreign affairs, becoming the effective government of Algiers by 1626. It began official acts with the phrase, "We, pasha and diwân of the invincible militia of Algiers". According to the priest and historian Pierre Dan [fr] (1580–1649), "The state has only the name of a kingdom since, in effect, they have made it into a republic."

#### Corsair autonomy

The corporate body of the Algerian corsairs was known as the taife reisi. It constituted the embodiment of state-sponsored piracy, since the economical prosperity of Algiers depended on the corsairs' loot. The taife formed a council of corsair captains who resided in the western quarter of the city of Algiers. Its primary functions were recruiting new corsair captains, increasing finances through public and private investement in privateering expeditions and protecting its own corporate interests from the janissaries. Algiers started strengthening and modernizing its fleet; by the end of the 16th century, janissaries were allowed to join corsair ships. As the 17th century began, the corsairs adopted square-rigged sails and tapered hulls. Their ships became faster and less dependent on a steady supply of galley slaves. This latest sailing technology was procured by the corsairs thanks to an influx of European renegades such as the Dutchman Simon Danseker, enabling the corsairs to grow powerful in the Atlantic.
The taife was led by the Qubtan (lit. 'Captain') referred by European official documents as the "General of the galleys of Algiers". European renegades made up a majority on the taife, amongst whom were former slaves who rose to positions of power. The most distinguished were the Albanian-born corsairs Qubtan Arnaut Mami and Qubtan Murat Reis the Elder, who headed the Algerian navy in 1574 and 1590 respectively. In 1610 the taife was led by the Dutch corsairs, Sulayman Reis and his subordinate Murat Reis the Younger. The latter became the leader of Salé's corsairs in the 1620s but still used Algiers as his base, from which he raided as far as Iceland in 1627 and Ireland in 1631.
The 17th century was a "golden age" for the North African corsairs. Algerian autonomy and rivalry between Christian states made the prestige and wealth of the corsairs reach its zenith as their intensified privateering filled Algerian coffers. Yahya Boaziz indicates that more than a thousand European ships were captured from 1608 to 1634, with more than 35,000 people enslaved, many of whom were Dutch, German, French, Spanish and English, making the value of the spoils total about 4,752,000 pounds. Pierre Dan estimated the value of seized cargo at around 20,000,000 francs. Algiers became a thriving market in the 17th century for captives and plundered goods from all over the Mediterranean, and a wealthy city with over 100,000 inhabitants. Reliance on piracy and the slave trade served to keep Algiers financially and politically autonomous. Renegade Ali Bitchin became qubtan in 1621 and raided Italian harbors. In 1638 Sultan Murad IV called the corsairs up against the Republic of Venice. A storm forced their ships to shelter at Valona, but the Venetians attacked them there and destroyed part of their fleet. Claiming the corsairs had not been in his service, the sultan refused to compensate them for their losses. In response, Ali Bitchin refused to answer a summons from the sultan to join the Cretan war against Venice in 1645. He then died suddenly, amid rumors in Algiers that the sultan had ordered his poisoning. From 1645 onward, the corsairs sent squadrons of sailing ships annually to join the Ottoman fleet in the war against Venice in return for subsidies in advance. This would later diminish their privateering activity.

### Military republic (1659–1710)
#### Agha regime

The pashas sent by the Sublime Porte worked to multiply their wealth as quickly as possible before the end of their three-year term in office. As governance became a secondary issue, the pashas lost all influence and respect, and aversion to the Sublime Porte increased. In 1659, Ibrahim Pasha pocketed some of the money the Ottoman sultan had sent to the corsairs as compensation for their losses in the Cretan War, which ignited a massive revolt, in which the rebellious corsairs arrested and imprisoned him. Khalil Agha, commander-in-chief of the janissaries of Algiers, took advantage of the incident and seized power, accusing the pashas sent by the Sublime Porte of corruption and hindering the Regency's affairs with European countries. The janissaries effectively eliminated the authority of the pasha, whose position became purely ceremonial. The Sublime Porte recognized the new government and ceased appointing triennial pashas. However, the title of pasha was retained as a symbol of Ottoman suzerainty, in exchange for the recruitment of new troops from Ottoman lands.
The Odjak assigned executive authority to Khalil Agha, provided that his rule would not exceed two years, and put legislative power in the hands of the diwan council. Khalil Agha began his rule by building the Djamaa el Djedid mosque. The era of the aghas began and the pashalik became officially a military republic. The first three aghas, Khalil, Ramazan and Shaban were all assassinated because they wanted to extend their term of office. Agha Ali, who ruled in 1665, became an autocratic sovereign who alienated the diwan and whose conciliation policy with European states at the expense of privateering angered the corsairs.

#### Deylik period

In 1671 an English squadron led by Admiral Sir Edward Spragge destroyed seven ships anchored in the harbor at Algiers, causing the corsairs to revolt and kill Agha Ali. Given the lack of candidates due to reluctance from the janissary leaders, the corsairs vowed to restore the government established by Hayreddin Reis. They entrusted the Regency's government and the payroll of the janissaries to an old Dutch-born reis named Hadj Mohammed Trik and gave him the titles of dey (lit. 'maternal uncle'), doulateli (lit. 'head of state') and hakem (lit. 'military ruler').
After 1671 the deys led the country and were supported by members of the diwan, of which the president seconded the dey and managed most state affairs. This centralized government institutionalized relations between the janissaries, effective holders of both military and political power, and the corsairs, as the Regency's economic powerhouse that would remunerate the janissaries through the deys. This gradual integration of autonomous political institutions, local military elites and financial powers, coupled with an independent foreign policy, rendered Algiers de facto independent of the Ottoman Empire. However, the deys' power was checked by the diwan, and both janissaries and corsairs ousted deys who lost their support.

### Foreign relations and privateering in the 17th century

Privateering operations were regulated by treaties with European powers. Algiers used privateering as a foreign policy tool to play its European counterparts against one other and hunt merchant ships, prompting European states to sign peace treaties and seek Mediterranean passes (documents that identified ships that had safe passage), allowing European states to secure lucrative cabotage trade. This gave the Regency's elites internal legitimacy as champions of jihad, and according to early modern European authors, international respect for the Regency's sovereignty as an established government, despite still being a "nest of pirates". The Dutch jurist Hugo Grotius (1583–1645) noted that "Algiers exercised the jus ad bellum of a sovereign power through its corsairs". The historian Daniel Panzac stressed:
   Indeed, privateering was based on two fundamental principles: it was one of the forms of war practiced by the Maghreb against the Christian states, which conferred upon it a dimension that was at one and the same time legitimate and religious; and it was exercised in a framework defined by a state strong enough to enact its rules and control their application.

#### Europe

After the Battle of Lepanto, the corsairs broke loose from the Sublime Porte and began to prey on ships from countries at peace with the Ottomans, whose peace with Habsburg Spain in 1580 did not concern their vassals, as both the Sovereign Order of Malta and the North African Regencies pursued hostilities. Their privateers were motivated by desires of vengeance, wealth and salvation. Spain would be debilitated by many of the Moriscos it expelled. They joined the corsairs and would ravage Spanish mainland and its territories in Italy, where they captured people en masse. England, France and the Dutch Republic were seen as allies by the Ottoman regencies until the end of the 16th century because of their common Spanish enemy, but when James I of England and the Dutch States-General opted for peace with Spain in 1604 and 1609, respectively, and increased their shipping in the Mediterranean, Algerian and Tunisian corsairs took advantage of their strong fleet to attack English and Dutch vessels, amassing wealth from capturing slaves and goods. Ottoman incapacity to force Algiers to respect the Ottoman capitulations led European powers to negotiate treaties with Algiers directly on trade, tribute and slave ransoms, recognizing Algerian autonomy despite its formal subordination to the Ottomans.
France first established relations with Algiers in 1617, with a treaty signed in 1619 and another in 1628. The treaties mostly concerned the re-establishment of the Bastion de France and the rights of French merchants in Algiers, but the Bastion was razed a second time by Ali Bitchin in 1637, as armed incidents between French and Algerian vessels were frequent. Nonetheless, a treaty in 1640 allowed France to regain its North African commercial establishments.
After attacks by the English in 1621 and the Dutch in 1624, Algerian corsairs took thousands of English and Dutch sailors to the Algerian slave market, resulting in intermittent wars followed by long-lasting peace treaties whose tribute payments terms ranged from money to weapons. Under Louis XIV, France built a strong navy to fend off the corsairs who raided Corsica and were everywhere in the waters off Marseilles in the late 1650s. According to Panzac, relations with Algiers became strained because Muslim slaves were never returned to Algiers, and privateering became a political necessity due to corsair-janissary rivalry, while European states faced financial difficulties in recovering their captives through diplomatic means. France launched multiple campaigns against the Regency, first in Jijel in 1664, then when several bombings of Algiers were conducted between 1682 and 1688 in what is known as the Franco-Algerian war, which ended when a 100-year peace treaty was signed between Dey Hussein Mezzo Morto and Louis XIV.

#### Maghreb

As Algiers entered a period of peaceful relations with Europe, the resulting decline in privateering forced Algiers to seek other sources of revenue. In 1692 Dey Hadj Chabane set his sights on his Maghrebi neighbors, Muradid Tunis and Alawi Morocco. For historical reasons, Algiers considered Tunisia a dependency because Algiers had annexed it to the Ottoman Empire, which made the appointment of its pashas a prerogative of the Algerian beylerbeys. Faced with Tunisian ambitions in the Constantine region and opposition to Algerian hegemony, the Algerian dey took the opportunity provided by the 20 years of civil war between the sons of the Muradid ruler of Tunis Murad II Bey to invade in 1694 and put a puppet bey on the throne. A vengeful Murad III Bey of Tunis allied with Morocco and started the Maghrebi war in 1700. He lost, and the Muradid dynasty was replaced by the Husainid dynasty in 1705.
Morocco opposed the Ottomans. It also had ambitions to expand in western Algeria—especially in Tlemcen. Algerian support for pretenders to the Moroccan throne was answered with several invasions by Sultan Moulay Ismail in 1678, 1692, 1701 and 1707, all of which failed. Moulay Ismail was forced to accept the Moulouya River as his eastern border with Ottoman Algeria.

### Dey-pashas of Algiers (1710–1792)

Early-18th-century pashas tried to regain some of their lost authority, creating conflicts and instigating sedition to overthrow the deys. From 1710 the deys assumed the title of pasha at the initiative of Dey Baba Ali Chaouch, and no longer accepted representatives from the Sublime Porte. The deys' legitimacy increased, allowing them to establish a more stable form of government. They were mainly elected from among the most powerful dignitaries of the dey's inner council known as "powers": the treasurer, the commander-in-chief and the receiver of tribute. The Ottomans acknowledged Algiers' full sovereignty while maintaining a claim of formal suzerainty. In practice, the deys only nominally recognized this by reciting the sultan's name on Friday prayers and striking it on their coins. According to the 19th-century French politician Pierre Genty de Bussy [fr]:
   The investiture requested by the Deys from the Sultans was only a pure formality, a homage paid to the most powerful prince of Islamism, but in no way a recognition of sovereignty.

#### Strengthened authority

The deys imposed their authority on the janissaries and the reis. European reactions, new treaties guaranteeing the safety of navigation and a slowdown in shipbuilding considerably reduced privateering. The reis did not approve of treaty provisions which restricted their activity, which was their main source of income, and remained attached to the external prestige of the Regency. They rebelled and killed Dey Mohamed Ben Hassan in 1724. The new dey, Baba Abdi Pasha, quickly restored order and severely punished the conspirators. He made his rule more absolute but less violent; the diwan was gradually wakened in favor of the dey's inner council, resulting in more stability through the implementation of a bureaucracy. On 3 February 1748 Dey Mohamed Ibn Bekir issued The Fundamental Pact of 1748, a text that defined the rights of the subjects of Algiers and of all inhabitants of the Regency of Algiers. It codified the behavior of the different army units: janissaries, gunners, chaouchs (lit. 'officers') and sipahis.
Fewer janissary recruits and a decreasing population and slave intake compelled the deys to expand and exploit the interior under their control. In the three beyliks (provinces), the beys relied on local notables since they had a limited number of janissaries. This allowed the Koulouglis to become beys. Fewer renegade defections and corsair prizes would shift the Algerian economy towards international trade dominated by Jewish merchants, who became a commercial power and eliminated many European merchant houses from the Mediterranean. This deeply worried the merchants of the French city of Marseilles, who saw their monopoly on Algerian external trade under threat. The Jewish merchants not only traded in conventional goods but also played a key role in handling prize goods seized by corsairs. Their economic influence and extensive networks made them indispensable to the Algerian government, as they skillfully aligned their business interests with the state’s strategic needs. This caused several commercial disputes between Algiers and both Spain and France. The latter's consuls harbored resentment toward Jewish merchants and repeatedly petitioned their government to enact regulations restricting their commercial activities in French ports.

#### Appeased relations

In 1718 Dey Ali Chaouch had Austrian ships captured in clear contradiction to the Treaty of Passarowitz between the Habsburg monarchy and the Ottoman Empire, and ignored an Ottoman-Austrian delegation's demand for compensation. Nevertheless, Algiers remained at peace with France and Britain, as both states had stronger fleets than Algiers but still believed it would be costly to fight wars against it.
Algiers imposed tributes and would trade further with Tunis and European states, with whom Algiers signed numerous treaties, such as Austria in 1725, the Dutch Republic in 1726, Sweden in 1729, Tuscany in 1749 and Denmark in 1751–1752. These treaties had been concluded faster than the 17th century's ones since European ships no longer used Muslim galley slaves and Algiers had set up a more stable succession system.
Spain and Algiers had maintained their mutual animosity. Determined to remove the Spanish from Oran, Dey Mohammed Bektach took the opportunity afforded by the War of the Spanish Succession to send Mustapha Bouchelaghem Bey at the head of a contingent of janissaries and local volunteers to take the city. He succeeded in 1707, but in 1732 the Duke of Montemar's forces recaptured the city. The Husaynid dynasty failed to free Tunis from Algerian suzerainty in 1735 and 1756. Tunis remained an Algerian tributary until the early 19th century.

#### Mohammed ben-Osman's rule

Baba Mohammed ben-Osman became dey in 1766 and ruled over a prosperous Algiers for 25 years until he died in 1791. He built fortifications, fountains and a municipal water supply; he also strengthened the navy, kept the janissaries in check and developed trade. The Algerian historian Nasreddin Saidouni reports that the Dey placed in the state treasury 200,000 Algerian gold sequins (or sultani) that he had saved from his salary during the Spanish attacks on Algiers. His governor of Constantine, Salah Bey, re-asserted Regency authority as far south as Touggourt. During his rule, Algiers maintained its military superiority over its eastern and western neighbors.
The Dey increased the annual tribute paid by several European states such as Britain, Sweden, the Italian states and Denmark, which sent a naval campaign against Algiers under Frederik Kaas in 1770; the campaign failed, and Denmark was forced to pay heavy war compensations and send gifts to Algiers.
In 1775 the Irish-born admiral of the Spanish Empire, Alejandro O'Reilly, led an expedition to subdue pirate activity in the Mediterranean. The assault's disastrous failure dealt a humiliating blow to the Spanish military. This was followed by two bombardments by Spanish admiral Antonio Barceló's fleet in 1783 and 1784, also ending in defeat. Led by Mohammed Kebir Bey in 1791, Algiers launched a final assault on Oran, which was retaken after negotiations between Dey Hasan III Pasha and the Spanish Count of Floridablanca. The assault marked the end of almost 300 years of a state of war between Algeria and Spain.

### Fall of the Regency (1792–1830)
#### Internal crisis

At the beginning of the 19th century, Algiers was plagued by political unrest and economic problems, beginning with famine from 1803 to 1805. Algerian reliance on the two influential Jewish merchants, Naphtali Busnash and David Bakri, to trade with Europe was so great that a crisis caused by crop failure led to the assassination of Busnash on 28 June 1805, as he was held responsible for alienating Muslim merchants from key external trade and impoverishing the population. This was followed by the assassination of Dey Mustapha Pasha by the Odjak in August 1805. Public unrest, a pogrom and successive coups followed, beginning a 20-year period of instability. In 1804 the Alawi Sultanate incited a massive Sufi Darqawiyya revolt in the peripheries of the Regency, which was quelled with difficulty by the governor of Oran, Osman Bey. Meanwhile, payment delays caused frequent janissary revolts, leading to military setbacks as Morocco took possession of Figuig in 1805 and then Tuat and Oujda in 1808, and Tunisia freed itself from Algerian suzerainty after the wars of 1807 and 1813.

#### Barbary Wars

British tribute payments no longer insured U.S. shipping traffic in the Mediterranean after the American Revolution. This caused Algerian vessels to attack American merchant ships in 1785, claiming the latter were no longer under British protection and asserting an Algerian right to search and seizure. The American president George Washington agreed to pay a ransom and annual tribute equal to $10 million over 12 years in accordance to a peace treaty with Algiers in 1795.
Internal financial problems led Algiers to re-engage in widespread piracy against American and European shipping in the early 19th century, taking full advantage of the French Revolutionary and Napoleonic Wars. From 1798 to 1815, the North African corsairs captured over 500 ships, with Algerian prizes amounting to 8,558,013 francs. This caused the Ottoman sultan Mahmud II to protest against Dey Omar Agha and his corsairs for attacking vessels belonging to both the Ottomans and European states at peace with the Sublime Porte. However, Algiers was defeated in the Second Barbary War by the United States in 1815, when Commodore Stephen Decatur's squadron killed Algerian qubtan Reis Hamidou in the battle off Cape Gata on 17 June 1815, ending the Algerian threat to U.S. shipping in the Mediterranean.
The new European order that emerged from the Coalition Wars and the Congress of Vienna did not tolerate Algerian raids and viewed them as a "barbaric relic of a previous age". In August 1816 British admiral Edward Pellew, 1st Viscount Exmouth carried out a bombardment of Algiers that ended in a British and Dutch victory, a weakened Algerian navy and the liberation of 1,200 slaves. Dey Ali Khodja, with support from the Koulouglis and the Kabyles, disposed of the turbulent janissaries and transferred the seat of power and the treasury of the regency from the Djenina Palace [Palais de la Jénina] to the Casbah citadel in 1817. The last deys of Algiers tried to nullify the consequences of the previous Algerian defeats by reviving buccaneering and resisting a British attack on Algiers in 1824, creating the illusion that Algiers could still defend itself against a divided Europe.

#### French invasion

During the late 18th century, Algiers advanced on credit 2 million tons of wheat to the French First Republic through Busnash and Bakri. In Napoleon's time, Algiers benefited greatly from Mediterranean trade and France's massive food imports, many of which were bought on an advanced credit of 1,250,000 francs by Dey Hasan III Pasha without interest. Algiers would even object an Ottoman call to arms against France when Napoleon started his campaign in Egypt in 1798, but Sultan Selim III forced Algiers to declare war in 1799 before a peace treaty was signed between France and the Ottoman Empire and its regencies in 1802. The French paid the Jewish merchants' debt but ignored the money lent by the dey. In 1827, Dey Hussein Pasha demanded that the restored Kingdom of France pay off a 30-year-old debt dating from the 1790s for providing supplies to the soldiers of Napoleon's campaign in Egypt. The response of French consul Pierre Deval displeased Hussein Dey, who hit him with a fly whisk and called him an "infidel". King Charles X took this incident as an opportunity to break off diplomatic relations and launch a full-scale invasion of Algeria on 14 June 1830. Algiers surrendered on 5 July, and Dey Hussein went into exile in Naples, which marked the end of the Regency of Algiers. The invasion led to the start of the Algerian popular resistance against the French colonial rule, which would last until the Algerian independence in 1962.

### Historiographic assessments of the Regency of Algiers

American political scientist John P. Entelis stresses that Europeans saw Algiers as "the center of pirate activity – that captured the imagination of Europe as a fearsome and vicious enemy". The 19th‑century French historian Henri de Grammont said:
   It gave the world the singular spectacle of a nation living from privateering and living only by it, resisting the incessant attacks directed against it with incredible vitality, submitting three quarters of Europe and the United States of America to the humiliation of an annual tribute; all this, despite unimaginable disorder and daily revolutions, which would have killed any other association, and which seemed to be essential to the existence of this strange people.
British historian James McDougall called this claim a "colonial myth". He pointed out that after the 17th century, termed by Merouche the "century of privateering", less lucrative privateering remained symbolic of a corsair state. Tribute payments to guarantee peace, trade, customs, taxation and increased agricultural production brought in most of the revenue of the Regency in the 18th century, which Merouche termed the "century of wheat".
American historian John Baptist Wolf argued that the local population resented occupation by a republic of foreign "cutthroats and thieves", and that the French "civilizing mission", although carried out by brutal means, offered much to the Algerian people. However, the British historian Peter Holt indicates that this antagonism never took a nationalist aspect and was balanced by strong ties such as shared faith, social structure and culture. The Algerian historian Nacereddin Saidouni argues that although Algeria was not a nation in the modern sense, it was nevertheless a local political entity that helped deepen the sense of community among large segments of the Algerian population in the countryside and cities. The historian Yahia Boaziz noted that the Ottomans repelled European attacks and convinced the population to abide by the decisions of a centralised state.
Historians John Douglas Ruedy and William Spencer write that the Ottomans in North Africa created an Algerian political entity with all the classical attributes of statehood and a high standard of living. Historian Mahfoud Kaddache [fr] considered the Ottoman period "catalytic to the modern geopolitical and national development of Algeria." Saidouni affirms that Algeria took a similar path as the rest of the North African states that gradually imposed their sovereignty, as it was no different from Muhammad Ali's Egypt, Husainid Tunisia and Alawid Morocco. The historian John Douglas Ruedy believes that the early 18th-century "deturkification" could have led to a 19th-century nationalization of the Algerian regime, but the French conquest put an end to this evolution. However, Ruedy notes that the end of tribal rivalries and the emergence of a true nation state occurred only after long years of brutal French conquest and colonial implantation and unrelenting Algerian resistance, culminating in the Algerian war of independence in 1954.

## Administration

The Regency of Algiers' prominence as a regional power was a result of the Ottoman naval strategy that aimed to dominate its Christian enemies through the establishment of permanent naval bases on North African soil. The corsairs waged war against the Christians through gunpowder and the resources of the Ottoman Empire. This granted them both political and military superiority to defeat weak local emirates and impose a foreign elite on a divided Maghrebi society. As a consequence Ottoman Algeria's administrative organization relied on a mixture of borrowed Ottoman systems and local traditions inherited from the Almohad Caliphate and its successor states. This was maintained by regular recruitment of military personnel from Ottoman ports in Anatolia and Morea, in exchange for tribute sent to the Sublime Porte.

### Stratocracy

Some contemporary observers described the Regency of Algiers as a "despotic, military-aristocratic republic". The French philosopher Montesquieu considered the Algerian government to be an aristocracy with republican and egalitarian characteristics, elevating and deposing a despotic sovereign. It was unique among Muslim countries in having limited democracy and elected rulers. Democracy was extremely unusual in 18th-century Europe, and the Genevan philosopher Jean-Jacques Rousseau found Algiers impressive in this respect, while historian Edward Gibbon considered Algiers a "military government that floats between absolute monarchy and wild democracy".
Power was in the hands of the Odjak. This government, described by the British philosopher Edmund Burke as "janizarian republick", centered on an Ottoman military elite consisting of several thousands of well-trained, resolute and democratically spirited Anatolian Turkish members of the janissary corps. It referred to itself as Algerian, but was separated from tribal and self-ruled indigenous society in the countryside. Merouche calls the Odjak a "collective regime", a "sovereign community" and a "military republic".
Inspired by his knowledge of Hospitaller Rhodes' organization during his captivity there (1501–1504), Aruj Reis excluded natives and Koulouglis from the Odjak, which was religiously endorsed and acted as a military order. Unlike modern political democracies based on majority rule, transfers of power and competition between political parties, politics in Algiers relied on the principle of consensus (ijma), which was legitimized by Islam and jihad. Rural populations gave allegiance and paid taxes to a military authority that respected their marabouts and defended them against Christian powers.
As a local government that accepted Ottoman suzerainty, Algiers underwent numerous political developments with the transformation of the Ottoman Empire from strength and expansion to weakness and stagnation. American historian John Baptist Wolf noted that this 17th century military democracy was later hampered by the absolute rule of the deys, starting from Baba Ali Chaouch in 1710.

#### Dey of Algiers

The French philosopher Marquis d'Argens compared 18th-century Algiers to the Roman Empire under Nero and Caligula and called it a republic, even though he also called the dey of Algiers a king. Charles-André Julien wrote that the dey was head of an elective but absolute monarchy. The dey was responsible for enforcing civil and military laws, ensuring internal security, generating necessary revenues, organizing and providing regular pay for soldiers and assuring relations with the tribes, but his power was limited by privateer captains and the diwan of janissaries, since any member of either body could aspire to become dey. His fortune came from his civil list (which did not exceed that of the highest paid member of the janissaries), and although he could still receive shares of privateer booty and gifts from consuls and beys, his fortune reverted to the public treasury in the event of assassination. This led some authors who compared the dey to the king of Poland–Lithuania to call him a "despot without liberty", a "king of slaves and slave of his subjects" and a "man of wealth but far from a master of his treasures".
Electing the dey was accomplished in absolute equality by unanimous vote among the armed forces. Ottoman Algerian dignitary Hamdan Khodja wrote:
   Among the members of the government two of them are called, one wakil-el-kharge, and the other khaznagy. It is from these dignitaries that the dey is chosen; sovereignty in Algiers is not hereditary: personal merit is not transmitted to children. In a way we could say that they adopted the principles of a republic, of which the dey is only the president.
Election was required for confirmation from the Ottoman sultan, who inevitably sent a firman of investiture, a red kaftan of honor, a saber of state and the rank of Pasha of Three Horsetails in the Ottoman army. Because the dey was elected for life, executing him was the only method to attain power, so violence and instability flourished. This volatility led many early 18th-century European observers to point to Algiers as an example of the inherent dangers of democracy.

#### Cabinet

The dey appointed and relied on five ministers (plus an agha), who formed the "council of the powers" to govern Algiers:
* Khaznaji [fr]: Treasurer in charge of finances and the public treasury. Often also translated as vizier of the dey, or prime minister.
* Agha al-mahalla [fr]: Commander-in-chief of the Odjak and minister of internal affairs, he was also responsible for governing the Dar Al-Sultan [fr] (lit. 'House of the Sultan') region.
* Wakil al-Kharaj [fr]: Minister of the navy and foreign affairs, he headed the teife reisi by the start of the 18th century. He was also responsible for matters relating to weapons, ammunition and fortifications.
* Khodjet al-khil [fr]: Responsible for relations with tribes, fiscal responsibilities and tax collections; he usually headed expeditions to the tribal interior. He also had the ceremonial role of "secretary of horses" and was assisted by a Khaznadar (lit. 'treasurer').
* Bait al-Maldji: Responsible for the state domain (makhzen lit. 'warehouse') and for rights devolved to the treasury such as vacant inheritances, registrations and confiscations.

#### Diwan council

The diwan of Algiers was established in the 16th century by Hayreddin Reis. To manage state affairs and govern the country, he relied on carefully chosen janissary members of the diwan council. This assembly, initially led by a janissary agha, evolved from an administrative body within the Odjak into a primary institution holding true power in Algiers. By the middle of the 17th century, it elected the head of state.
The diwan comprised two divisions:
* Diwân khass (lit. 'private council'): Any recruit could rise through the ranks (one every three years). Over time, he would serve among 24 janissary bulukbashis (lit. 'senior officers'), who were ranked by seniority and voted on high politics. The commander-in-chief or "Agha of Two Moons" was elected for a term of two months as president of the diwan. During the Agha period (1659–1671) he was the actual ruler of the Regency and held the title of hakem. The agha was the holder of the 'Ahad aman (lit. 'Fundamental pact') of 1748, which was often considered the constitutional basis of the Regency. According to Hamdan Khodja: The head of this divan is called Aghat-el-Askar; he carries a saber and a kind of relic which contains the regulations of the regency (their charter); The agha must always carry this relic with him and never part without it.
* Diwân âm (lit. 'public, or grand council'): Composed of 800 to 1,500 Hanafi scholars and preachers, the reis, and native notables. By the early-mid 17th century, the pasha, the agha of the janissaries and the qubtan of the corsairs were heads of their respective factions in the Grand Diwan, holding decision-making power and sharing sovereignty in Algiers. However, starting from the Agha period, the Grand Diwan convened only to make wartime decisions and to resolve serious disputes within the government. At the beginning of their mandate, the dey consulted the diwan on all important questions and decrees. This council in principle met weekly, depending on the dey, though by the 19th century, the dey could ignore the diwan whenever he felt powerful enough to govern alone.

#### Judicial hierarchy

In Algiers, two distinct Islamic legal systems operated: Hanafi law for the Turks and Maliki law for the wider Muslim population. Each system had its own Qadi (lit. 'judge'), appointed from Constantinople in the early 17th century. The Qadi handled most appeals, except for members of the Odjak, who could escalate cases to their agha. Above the Qadis were the muftis (lit. 'jurists'), chosen by the dey for their integrity and knowledge, recognizable by their white kaftans. Imams, though not legal officials, were often consulted on complex Koranic issues. The Jews had their own courts and the Christians reverted to consular courts regarding commercial, civil and criminal cases, which would come under the jurisdiction of the dey and the diwan if Muslims were involved.

### Territorial management

The Regency was composed of various beyliks under the authority of beys (lit. 'governors'):
* The Dar al-Sultan included the city of Algiers and nearby ports.
* The eastern beylik, named after its capital, Constantine.
* The beylik of Titteri in the centre was established in 1548, with Médéa as its capital.
* The beylik of the West was established in 1563; its capital moved from Mascara to Mazouna in 1710, then to Oran in 1791.
These beyliks were institutionally distinct and enjoyed significant autonomy. Under the beylik system, the beys divided their beyliks into outan, or counties, governed by caïds (lit. 'commanders') under the authority of the bey to maintain order and collect taxes. The beys ran an administrative system and managed their beyliks with the help of commanders and governors among the makhzen tribes. In return, these tribes enjoyed special privileges, including exemption from taxes. The bey of Constantine relied on the strength of the local tribes, particularly the Beni Abbas in Medjana and the Arab tribes in Hodna and the M'zab region. The chiefs of these tribes were called "Sheikh of the Arabs". This system allowed Algiers to expand its authority over northern Algeria for three centuries.

## Economy
### Monetary system

Algiers used three main categories of currency:
* Gold coins: The Sultani and Mahbub, weighing approximately 3.2 grams, the half Sultani (1.6 grams) and the quarter Sultani (0,8 grams).
* Silver coins: These were widely circulated and included the Algerian budju, weighing 10 grams and would equate 3 Algerian pataques.
* Copper or billon coins: The aspre or Akçe, sometimes referred to as the kharouba. Additionally, there was the Mangır [fr], a copper coin that fell out of use during the 18th century.
A unit of account, which did not exist as physical coinage, was also in use: The pataque chique, also known as the "current piastre of Algiers" in Europe, and known in Algiers as Cezayir doro.
Algerian currency was minted at the Dâr al-Sikka [fr], the mint located in Algiers, in conformity with the standards set by the Sublime Porte in terms of metal content, weight and value. This institution played a significant role in monetary policy, as the deys adjusted the quality of the alloys based on their needs. American consul in Algiers William Shaler indicated that in the 1820s, the treasury of the Casbah contained at least 250 million francs. During the French conquest of Algiers in 1830, more than 100 million francs were pillaged from the treasury according to Julien.

### Slave trade

Algerian corsairs captured many people on land and at sea from Mediterranean shores to Atlantic high seas. According to Wolf, at least 400,000 slaves were brought to the slave market in the city of Algiers, known as Bedestan between 1520 and 1660. From 1660 to 1830 numbers went down to at least 200,000 slaves, without counting the slave population in the entire Regency, totaling over one million European slaves in the early modern period as claimed by American historian Robert Davis. As a result, slavery became the cornerstone of the Algerian economy.
Government-owned captives were held in prisons called bagnos; six operated in Algiers. Privately owned captives were housed by their owners, who were often rich individuals or privateering collectives. After captured individuals were paraded naked, examined and inspected to assess their qualities, social position and value, they were divided into four groups:
* Those believed ransomable: Usually rich and better referred to as "captives", they were an important source of revenue. Their owners spared them the hardest tasks to preserve their value, as they were to be ransomed as quickly as possible. "The captive was a piece of merchandise which it was to no one's interest to damage", noted Julien.
* Those not believed ransomable: Lower-class and priced like their Muslim counterparts in France, these prisoners often became galley slaves or were assigned to other forced labor like moving rocks. A few were chosen as household domestic slaves.
* Those freed without ransom to be exchanged for Muslim captives, to honor prior agreements between states, or because a war had been lost.
* Those with special skills, such as surgeons and master carpenters who built or repaired ships, often could not be ransomed at any price.
The pasha took his share of the "best merchandise" first. The next day after midday prayer the rest of the slaves were led one by one near the docks, where a guardian would give the crowd an account of their worth before they were sold to the highest bidders. These were usually wealthy corsair captains, merchants and members of the Jewish community.
In Spain, France and the Dutch Republic, ransom funds came from the captive's family, the state or religious orders of the Catholic church who negotiated in Algiers for the captives. Catholic missions such as the Trinitarians and the Mercedarians were instructed to identify captives in danger of apostasy, captives whose family and friends had raised money and valuable individuals before reaching a ransom agreement. Captives who could buy their own freedom were allowed to move freely in Algiers, and often managed its taverns. Christians were exchanged for small sums in the early 16th century. However, in the 17th century redemptionist missions paid at least 100 pounds for their freedom. Persons of distinction were almost priceless: the Spanish governor of Oran Don Martín de Córdoba was released from captivity for 23,000 Spanish escudos. Catalan nobleman Glaceran de Pinos paid 100,000 doubles of gold and offered 100 pieces of silk for his freedom. The governor of the Canary Islands bought himself back in 1670 for 60,000 pounds.
After ransom was paid, additional fees for customs duties were still required, over 50 percent of the agreed ransom:
* 10% for customs
* 15% for the pasha or dey
* 4% for the khaznaji
* 7% for the Caïd al-marsa (lit. 'Harbourmaster')
* 17% for prison guards

### Royalties

Algiers charged its European trading partners royalties for freedom of navigation in the western Mediterranean and gave the merchants of those countries special privileges, including lower customs duties. Royalties were also imposed on Bremen, Hanover and Prussia, in addition to the Papal States at times. These royalties were paid annually or biennially and differed according to the relationship between those countries and Algiers, and the conditions prevailing in that period had an impact on determining their amounts, shown in the following table:
Royalties: Late 18th century to early 19th century :
| Country | Year | Value |
| Spanish Empire | 1785–1807 | After signing the armistice of 1785 and withdrawing from Oran, was required to pay 18,000 francs. It paid 48,000 dollars in 1807. |
| Grand Duchy of Tuscany | 1823 | Before 1823, 25,000 doubles (Tuscan lira) or 250,000 francs. |
| Kingdom of Portugal | 1822 | 20,000 francs |
| Kingdom of Sardinia | 1746– 1822 | Under the treaty of 1746, 216,000 francs by 1822. |
| Kingdom of France | 1790– 1816 | Before 1790, it paid 37,000 livres. After 1790, it pledged to pay 27,000 piastres, or 108,000 francs, and in 1816 committed to pay 200,000 francs. |
| United Kingdom of Great Britain and Ireland | 1807 | It pledged to pay 100,000 piastres, or 267,500 francs, in exchange for certain privileges. |
| Kingdom of the Netherlands | 1807–1826 | In the treaty of 1826, it committed to paying 10,000 Algerian sequins, and in 1807, it paid 40,000 piastres, or 160,000 francs. |
| Austrian Empire | 1807 | In 1807, paid an estimated 200,000 francs. |
| United States | 1795–1822 | In 1795 paid 1,000,000 dollars annually, and $10 million over 12 years, in exchange for special privileges. Equipment accounted for 21,600 dollars. |
| Kingdom of Naples | 1816–1822 | Paid royalties estimated at 24,000 francs. Starting 1822, paid a royalty of 12,000 francs every two years. |
| Kingdom of Norway | 1822 | Royalty of 12,000 francs every two years. |
| Denmark | 1822 | Paid 180,000 francs every two years. |
| Kingdom of Sweden | 1822 | 120,000 francs every two years. |
| Republic of Venice | 1747–1763 | From 1747, it paid 2,200 gold coins annually, which in 1763 became an estimated 50,000 riyals (Venetian lira). |

### Trade
#### External trade

Along with tribute payments, Algerian wheat exports to Europe replaced privateering as its primary source of income in the 18th century and became the core factor in trade relations between Algiers and Britain, Genoa and France. The French Compagnie royale d'Afrique [fr] (lit. 'Royal African Company') controlled French wheat imports in 1741 from the Algerian Constantinois region. Merouche wrote:
   [...] well over 100,000 quintals of wheat (is) exported each year from Algerian ports in 1698 and 1699. The great movement of cereal exports began in 1693 and would expand thereafter. The century of wheat succeeded the century of privateering.
Most Algerian exports went to Marseilles. Exports included, according to historian William Spencer, "carpets, embroidered handkerchiefs, silk scarves, ostrich feathers, wax, wool, animal hides and skins, dates, and a coarse native linen similar to muslin". The sea trade was run by the Bakri and Busnash families, who had settled in Algeria by 1720. After acting as mediators in the Christian slave trade in the heyday of privateering, they entangled the public interest of the Regency with the private interests of their own companies through their European contacts. These merchants amassed massive wealth from dealing in goods such as wheat and leather and from their monopoly on olive oil and customs taxation. They became the financiers of the dey and mediators between Algiers and Europe, both in diplomacy and in trade.
Large caravans of 300 mules went overland to neighbouring Tunisia twice a year. The city of Constantine was a meeting point for caravans from the Sahara, Tunis and Algiers; they were loaded with woven fabric, carpets, chechias, luxury goods and coffee. Caravans from the south brought dates and wool products like burnouses and haiks. In the west, Tlemcen was linked by trade routes as far as Tafilalt in Morocco and Timbuktu in the Sudan. The former brought salt, spices, Moroccan leather, silk and gunstock; the latter, ostrich feathers, ivory, slaves, vermillion, copper and gold. "Desert oases have historically been essential, strategic locations in trans-Saharan routes," wrote Chaibou and Bonnet, naming "Bilma (Niger), Ouardane (Mauritania), In Salah (Algeria), Taoudenni (Mali), Iférouane, Chinguetti (Mauritania), Kufra, and Murzuk (Libya)."

#### Imbalanced trade

Algerian commerce faced significant constraints due to state-imposed monopolies designed to secure stable revenues. Key exports like salt, olive oil, and hides were heavily restricted, with some reserved for trade only within the Ottoman Empire, while trade in military assets such as cannons and small arms was prohibited. Regional monopolies, such as those granted to the beys of Oran and the French at Bona, further limited trade, while export licenses and concessions for goods like grain, wool, and wax added bureaucratic hurdles. These measures stabilized state finances but stifled local economic growth, leading to an unfavorable balance of trade. Despite adherence to Ottoman capitulations in theory, local regulations prevailed in practice. Import duties were set at 12.5%, export duties at 2.5%, and port fees added further costs.
In 1822, the Regency's international trade totaled approximately 7 million francs, with imports making up 80% of the total. This reliance on imported goods led to economic challenges, including deindustrialization and capital outflow. Export revenues declined significantly, particularly due to the near disappearance of wheat from foreign trade, a major export in earlier centuries. By the late 1820s, the total trade value had dropped to around 5 million francs.

#### Internal trade

Overland trade used animals to transport goods. Carts could be used on suitable roads. The many official posts of the Odjak and the makhzen tribes along the way provided security for caravans. In addition, caravanserais, locally known as fonduk, gave travelers a place to rest. Products such as wool from the tribal interior were traded in bazaars (known locally as souks). These took the names of tribes preceded by days of the week, for example: Souk Al-Arbaa Al-Attafs (lit. 'Wednesday market of Al-Attaf tribe'). Souks formed hubs for trading agricultural products such as grain, olives, cattle, sheep and horses. In urban marketplaces they bought imported jewelry, textiles and pottery. Jewish intermediaries helped further exchanges between cities and the countryside.
Administrative control over the Sahara was often loose, but Algiers's economic ties to it were very important, and Algerian cities were among the main destinations of the trans-Saharan slave trade. In the late 18th century the Regency "appears to have witnessed considerable commercial activity in the Algerian Sahara, related perhaps to the period of stability and prosperity under Dey Baba Mohammed ben-Osman, who ruled at Algiers from 1766 to 1791", Donald Holsinger wrote, "despite the picture of commercial decadence which has sometimes been painted for the Regency".

### Taxation

Some of the taxes levied by the Regency fell under Islamic law, including the ushr (tithe) on agricultural products, but some had elements of extortion. Periodic tithes could only be collected from crops grown on private farmland near the towns; instead, nomadic tribes in the mountains paid a fixed tax, called garama (lit. 'compensation'), based on a rough estimate of their wealth. In addition, rural populations also paid a tax known as lazma (lit. 'obligation') or ma'una (lit. 'support') that paid for Muslim armies to defend the country from Christians. City dwellers had other taxes, including market taxes and dues to artisan guilds. Beys also collected dannush (lit. 'gifts') every six months for the deys and their chief ministers. Every bey had to personally bring dannush every three years. In other years, his khalifa (lit. 'deputy') could take it to Algiers.
The arrival of a bey or khalifa in Algiers with dannush was a notable event governed by a protocol setting out how to receive him and when his gifts would be given to the dey, his ministers, officials and the poor. The honors that the bey received depended on the value of the gifts he brought. Al-Zahar reported that the chief of the western province was expected to pay more than 20,000 doro, half that in jewelry, four horses, fifty black slaves, wool from Tlemcen, silk garments from Fez, and twenty quintals each of wax, honey, butter, and walnuts. Dannush from the eastern province was larger and included Tunisian perfumes and clothing.

### Agriculture

Agricultural production eventually overtook privateering as a source of Regency revenue in the 18th century. Fallowing and crop rotation were widely practiced. Wheat, cotton, rice, tobacco, watermelon and corn were the most commonly grown products. Cereals and livestock products especially constituted much of the export trade after providing for local consumption of oil, grain, wool, wax and leather.
The state owned very fertile lands called fahs. Located near the main towns, these lands were granted to Turkish military personnel, Koulouglis families, makhzen tribes and urban notables under the azl (lit. 'grant') system. Fahs were cultivated by tenant farmers who received a fifth of the harvest under the khammas sharecropping system for common land. The northern Metija region provided it with various fruits and vegetables. Algerian wine was particularly sought after in Europe for its quality.
Vast areas of Algeria's land were known as arsh (lit. 'collective'), where animal husbandry predominated. Historian Mahfoud Kaddache stresses: "Arsh land, land of the tribes, belongs to the tribal community, it is frequently divided into two parts; the larger part, undivided, is used by the entire tribe and forms pasture areas, the second part is reserved for crops and allocated between families." Lands classified as melk (lit. 'private') were under customary Berber law and were possessed and inherited through tribal families.
Algeria's agricultural wealth came from the quality of the cultivated land, agricultural techniques (ploughs dragged by oxen, donkeys, mules, or camels), and irrigation and water systems that supplied small collective dams. The Algerian historian Mouloud Gaid [fr] wrote: "Tlemcen, Mostaganem, Miliana, Médéa, Mila, Constantine, M'sila, Aïn El-Hamma, etc., were always sought after for their green sites, their orchards and their succulent fruits." South of the Tell Atlas, most of the western population and the people of the Sahara were pastoralists, nomads and semi-nomads who grew dates and bred sheep, goats and camels. Their products (butter, wool, skins, camel hair) were traded north in their annual migration to summer pastures.

### Crafts

Algerian manufacturing was largely related to shipyards, which built frigates of oak sourced from Kabylia. The smaller ports of Ténès, Cherchell, Dellys, Béjaïa and Djidjelli built shallops, brigs, galiots, tartanes and xebecs used to fish or transport goods between Algerian ports. Christian slaves were employed in these shipyards, often managed by Christian renegades, and sometimes even free Christians as captains of armament or engineers of naval constructions, whose services were hired without a requirement to convert to Islam. Several workshops supported repairs and rope-making. The quarries of Bab El-Oued extracted stone, raw material for buildings and fortifications. The Bab El-Oued foundries produced cannons of all sizes for the warships of the Algerian navy and for use as fort batteries and field artillery.
Cities were established centers for artisanry and served as hubs for international trade. Residents of Nedroma, Tlemcen, Oran, Mostaganem, Kalaa, Dellys, Blida, Médéa, Collo, M'Sila, Mila and Constantine were mostly artisans and merchants. The most common crafts were weaving, woodturning, dyeing, rope-making and tool-making. Algiers was home to foundries, shipyards and workshops. Tlemcen had more than 500 looms. Artisans were prevalent even in small towns.

## Society
### Urban population

At most 6% of the population lived in cities. In the 17th century the population of Algiers was dominated by refugees from Andalusia and also included about 35,000 European slaves working on the docks and in quarries and shipyards. In the 18th century, French and Italian Jewish merchants began to arrive, a distinct and more affluent group than the Jewish minority among the earlier Andalusi arrivals.
In the early 19th century the Regency's population numbered 2,5 or 3 millions. It included around 10,000 Turks, 5000 Koulouglis, and about 1,000 black slaves who worked as household servants; many freed black slaves also worked on the docks as masons. Local administration was managed entirely by native Maghrebi Moors who could hold legal and police powers within Algiers as mayors. They supervised guilds which regulated most trade and, like city neighborhoods headed by amins (lit. 'headmans'), responded to emergencies and strengthened community solidarity. The Muslim faith prevailed in every aspect of life. The fraternal relations in the hierarchical system of urban Algiers were devoid of rivalry between the few great merchants in the wealthy upper class and the poorer lower classes of shopkeepers, craftsmen and scholars. In addition to butcher shops and grocery stores, Ibadi Mozabites operated bath houses. The shops and bazaars clustered around the alleys off the single main street of the lower city near the harbor, overlooking the sea in the lower town or strategically located at crossroads.

#### Languages

Public business was carried out in both Osmanli and Arabic. The former was used by the Odjak as the official language of the Regency, while the latter was common among the native population, Moriscos and eventually the Turks as well. Arabic would also attain official status by the start of the Deylik period. A lingua franca, called Sabir, had emerged in Algiers, blending Arabic, Spanish, Turkish, Italian, and Provençal. It would develop as a common language among European renegades, prisoners, and resident merchants.

### Social structures

In rural areas, the tribe was a primary social and political structure based upon family. Competition among tribes for land and water was mediated through a sense of unity based on consanguinity, shared Islamic faith and their economic need to trade with each other to prevent dangerous social friction and encourage unity against external threats. Under the Regency's rule, a complex link of interdependencies would develop between the tribes and the state; the tribes adapted to government pressure and would participate in power dynamics through both collaboration and competition with the state. The latter would establish order from a tribal setting.
The city being the political and military center of power was no longer a source of constant political repression over its hinterland from which it extracted wealth, ending a centuries-old factionalism between urban and rural inhabitants of the central Maghreb. Cities and villages articulated their own organizations within the tribal systems and confederations. Although they depended on tribal society, cities weakened the political power and influence of tribes by giving more weight to the individual, allowing more personal freedom. The tribes' importance varied from region to region; they remained relatively important in the Aurès mountains of eastern Algeria, for example. Inside cities, tribes were assigned social roles; the Biskri Berbers were charged with street maintenance and guarding quarters, and the Berbers of Kabylia and Aurès frequently worked in Algiers.
The state was sometimes necessary for the prestige of the tribes; Makhzen tribes derived their legitimacy and power from their affiliation to the government, protecting urban areas, collecting taxes and exercising military control of the state in the countryside. The rayas tribes were tax-paying subjects, and the siba tribes were dissidents who opposed taxes, which reduced their surplus production. However, they still depended on market access organised by the state and the makhzen tribes. The markets outside the territories dependent on the state were managed by the marabouts who very often acted as guarantors of tribal order.
The political authority of the tribes depended either on their military strength or their religious lineage. These two aristocracies—the religious brotherhoods who dominated the west, and the djouad [fr] strongman families of the east—often opposed one another. Algerian society had three separate aristocracies:
* Djouads: warriors, often heads of powerful autonomous tribes or tribal confederations, like the Berber Mokranis, Beni Abbas or Ben-Gana family of the Arab Hilalian confederations in the eastern beylik. The latter were related to Bey Ahmed of Constantine. The Regency often saw these tribes as allies.
* Sharifs: a religious nobility who claimed descent from the prophet Muhammad. They were often members of the religious and socio-politically priviledged Naqib al-ashraf institution of the Ottoman Empire. The last Algerian naqib al-ashraf Al-Zahar was a member of this nobility. Other sharifs were members of Sufi zawiyas, like the Emir Abdelkader, who was affiliated with the Qadiriyya tariqa (lit. 'path').
* Marabouts like Awled Sidi Cheikh ruled the western oases until the 19th century. Relying on religious ascendancy, they maintained order and preserved social and tribal links. The Awlad Sidi Cheikh were not a dynasty but a political confederation headed by a riyasa (lit. 'chiefdom') and maintained by maraboutic brotherhoods. Marabouts also shared in corsair booty.

## Culture
### Education

Education mainly took place in small primary kuttabs (lit. 'schools') that focused on reading, writing and religion. Imams, zawiyas, marabouts and elders did most of the teaching. Literacy was so effectively taught in these religious schools that in 1830 the literacy rate in Algeria was higher than in France. Qadis or muftis often taught at the madrasas (lit. 'colleges') of the larger cities, maintained through central government funding and an inalienable charitable endowment under Islamic law, known as waqf. The students received education on Islamic jurisprudence and Islamic medicine. Afterwards they became teachers, joined the qadis and muftis or pursued further education in the universities of Tunis, Fez or Cairo.
In the Zayyanid period, Tlemcen had been a primary center of Islamic culture, but schools and universities there declined due to neglect. Abu Hammu II's madrasa, known as Yaqubiyya, fell into complete ruin. The military and naval Ottoman elites, driven by a strong belief in the need to prevent northern Christendom from expanding its military influence into the Maghreb, prioritized fortifications, naval fleets, and castles over the development of intellectual culture. This strategic focus on defense and military infrastructure came at the expense of fostering learning and scholarly pursuits. In the late 18th century, the bey of Oran Mohammed el Kebir, significantly invested in renovating and rebuilding several new educational facilities in the region.

### Architecture

Architecture during this period showed a convergence of Ottoman influence with local traditions. Mosques began to be built with domes under Ottoman influence, but minarets generally still had square shafts in the local tradition instead of the round or octagonal shafts seen in other Ottoman provinces, where pencil-shaped minarets were symbols of Ottoman sovereignty. The Ali Bitchin Mosque in Algiers was commissioned by its namesake in 1622. The Djamaa el Djedid (lit. 'New Mosque'), built in 1660–1661, became one of the most important Hanafi mosques in Algiers. Architecturally one of the most significant remaining mosques of this era, it exemplifies a mix of Ottoman, North African, and European design elements, with its main dome preceded by a large barrel-vaulted nave. By the end of the 18th century, the city had over 120 mosques, including over a dozen congregational mosques.
Of the emblematic Ketchaoua Mosque, built by Dey Hassan III Pasha, Moroccan statesman and historian Abu al-Qasim al-Zayyani wrote in 1795: "The money spent on it...was more than anyone could allow himself to spend except those whom God grants success." Originally similar in design to the Ali Bitchin Mosque, its appearance radically changed under French colonial rule.
After the Ottomans arrived, architectural ceramic tiles replaced zellij tiles decorated with stars and polygons used in geometric patterns in the medieval Maghreb. Square decorative ceramic tiles were widespread in Algiers and Constantine, with simpler examples in Tlemcen. According to Dr. Abdulaziz Al-Araj, "In the Turkish era tiles were characterized by...motifs in Islamic art such as epigraphic, geometric, and floral motifs." In addition to landscapes, seascapes, ships and animals, the tiles came in three types: Turkish, Tunisian and European (sourced from Italy, Spain and the Netherlands). They decorated interior walls and floors, forming bands, patterns and frames around door jambs, window frames and balusters.
Algiers was protected by a wall about 3.1 kilometres (1.9 mi) long with five gates. Seafront fortifications were supplemented by forts outside the city, which included the "star fort" built above the Casbah in 1568 to defend the landward approaches to the city, the twenty-four hour fort in 1568–1569, and the Uluj Ali fort built in 1569 covering the Bab El-Oued beach. Facing south was the Sultan Kalassi [fr] (lit. 'Emperor fort'), built between 1545 and 1580. The Casbah occupied the highest point of the city. The lower town near the harbor was the center of Regency administration and contained the most important markets, mosques, palaces, janissary barracks and government buildings such as the mint.
The construction of Djenina Palace, also called the Pasha's palace, was begun in 1552 by Salah Reis and finished in 1556. Ali Bitchin's Spanish captive Emmanuel de Aranda described it as "a public structure for those who are advanced to that charge [i.e., the position of governor], well built after the modern way of Architecture". He added: "The most beautiful house in Algiers is that of Bacha [Bassa], or Viceroy, which is almost in the middle of the city. [It has] two small galleries one above the other, supported by a double row of columns of marble and porphyry." The Djenina was located at the center of a larger complex known as the Dar al-Sultan until 1817, when Dey Ali Khodja moved to the Palace of the Dey in the Casbah. The only building from the Dar al-Sultan complex that remains today is the Dar 'Aziza Bint al-Bey. American art historian Jonathan M. Bloom believes it to have been built in the 16th century.

### Arts
#### Crafts

Three centuries of Ottoman influence in Algeria left many cultural elements of Turkish origin or influence, wrote the French specialist professor of handicraft studies, Lucien Golvin.
* Brassware imported by janissaries likely inspired copper lanterns, trays, and ewers made in Algiers, Constantine and Tlemcen with Ottoman decorative elements like tulips and carnations.
* Ornate bronze door knockers were manufactured in Tlemcen until about 1930. Algiers and Constantine produced simpler versions.
* Saddlers made velvet-covered saddles embroidered with gold or silver thread, and bridles, belts, saddlecloths and boots with traditional Ottoman ornamentation.
* Ghiordés rugs and rugs from Kula seem to have influenced the early 19th-century adoption into the rugs of Hammam Guergour, Nemencha and Harakta tribes of large central lozenge-shaped medallions with arched lobes in a mihrab pattern, bordered by bands of floral elements. Those produced at the Qalat Banu Rashid fortress displayed multiple medallions in a more Andalusi style, and in the Amour mountains the Amour tribe [fr] continued to produce traditional tent rugs in geometric patterns.
* Clothing of janissaries, deys and other dignitaries was distinctive enough to be known in the Mediterranean as "Algerian style", including turbans and red sheshias, burnouses, kaftans, sédria (lit. 'vests') embroidered with patterns, wide and baggy trousers belted with broad silk sashes, and babouche slippers. They were frequently armed with yatagans.
* Needle lace (Chebika) and embroidery from Algiers were made under ma'allema (lit. 'teacher') on a gargaf (lit. 'horizontal loom'). Embroidery from Annaba and Djidjilli was multicolored with flat dots.

#### Music

New arrivals from Anatolia and Spain brought music to Algiers. Accented Ottoman military music with Sufi bektashi origins was played by janissary bands called mehterân. Andalusi classical music brought to Algiers by Moriscos developed three styles: Tlemcenian gharnati, Constantine's ma'luf and sanaa in Algiers. It was widespread in coffeehouses and often played by orchestras of tar, oud and rebab. Contemporary Algerian chaabi musician El-Hachemi Guerouabi recounts the exploits of corsairs against the Knights of Malta in his song Corsani Ghanem (English: Our corsairs captured a prize) based on 16th-century Algerian Arabic poetry by Imad Al-Din Doukkali.