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 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 . 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, , 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 , 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. had seized power in Tlemcen and imprisoned his nephew . 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 —a
regent with the title of ()—and sent him 2,000 janissaries, who formed a privileged military corps. Algiers officially became an () under Selim's successor
Suleiman I in the spring of 1521. From this year onward, the Ottoman sultans appointed Algerian corsair captains as . 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 "" (). 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 (). 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 (grand admiral of the Ottoman fleet) in 1533. Before departing, Hayreddin named
Sardinian renegade
Hasan Agha his deputy in Algiers.
Beylerbeylik period (1533–1587) , 1923.The 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 became and led the Ottoman expansion in the Mediterranean. For most of the 16th century, the 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 often remained in power for several years and exercised authority over Tunis and Tripoli as well. In addition, the system that granted fertile land to Ottoman elite cavalrymen was not applied in Algiers; instead, the 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
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 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 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 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 . 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 . Uluj Ali's deputy
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) (1684).
Amsterdam Museum. Fearful of the growing authority of the , 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 and , 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 () 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 , was distinct from the janissary garrison in Constantinople. Its members were not (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 (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 —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 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 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 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 (1580–1649), "The state has only the name of a kingdom since, in effect, they have made it into a republic."
Corsair autonomy (1590–1652) (
Royal Museums Greenwich)|alt=A square-rigged ship leaving a harbor The
corporate body of the Algerian corsairs was known as the . It constituted the embodiment of state-sponsored piracy, since the economical prosperity of Algiers depended on the corsairs' loot. The 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 investment 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 was led by the () referred by European official documents as the "General of the
galleys of Algiers". European renegades made up a majority on the , 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 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. After initial threats from the
Grand Vizier Köprülü Mehmed Pasha, 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 assigned executive authority to Khalil Agha, provided that his rule would not exceed two years, and put legislative power in the hands of the 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 and whose conciliation policy with European states at the expense of privateering angered the corsairs.
Deylik period sent on seven captured ships in
Béjaïa on 18 May 1671, by
Willem van de Velde the Younger (1633–1707). British Royal Collection 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 named Hadj
Mohammed Trik and gave him the titles of (), () and (). After 1671 the led the country and were supported by members of the , of which the president seconded the 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 . 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 ' power was
checked by the , and both janissaries and corsairs ousted who lost their support.
Foreign relations and privateering in the 17th century Operating under the aegis of the Ottoman Empire, Algerian corsairs waged maritime campaigns that were both lucrative and ideologically framed as religious warfare against Christian powers engaged in conflict with Algiers. In the 16th and 17th centuries, the corsairs hoisted
Islamic green flags adorned with
crescents and stars, later replacing them with red flags in the 18th and 19th centuries. Internally, they acquired the status of () and champions of
jihad, which underpinned the political and religious legitimacy of the Regency's elites. 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. In this context, early modern European authors recognized an international respect for the Regency's sovereignty as an established government, despite still being a "nest of pirates". Ottoman records clearly distinguished between () and (), and 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:
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 . 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
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
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 . Faced with Tunisian ambitions in the
Constantine region and opposition to Algerian
hegemony, the Algerian took the opportunity provided by the 20 years of civil war between the sons of the
Muradid ruler of Tunis
Murad II to
invade in 1694 and put a puppet on the throne. A vengeful
Murad III 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) 's
envoy Mr Dusault in 1719. Ismaël Hamet, 1720. Gallica.|alt=Four people writing behind a turbaned man in talks with a group of representatives. Early-18th-century pashas tried to regain some of their lost authority, creating conflicts and instigating sedition to overthrow the . From 1710 the assumed the title of pasha at the initiative of
Baba Ali Chaouch, and no longer accepted representatives from the Sublime Porte. The ' legitimacy increased, allowing them to establish a more stable form of government. They were mainly elected from among the most powerful dignitaries of the '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 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 :
Strengthened authority The imposed their authority on the janissaries and the . European reactions, new treaties guaranteeing the safety of navigation and a slowdown in shipbuilding considerably reduced privateering. The 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
Mohamed Ben Hassan in 1724. The new ,
Baba Abdi Pasha, quickly restored order and severely punished the conspirators. He made his rule more
absolute but less
violent; the was gradually wakened in favor of the 's inner council, resulting in more stability through the implementation of a
bureaucracy. On 3 February 1748
Mohamed Ibn Bekir issued a renewed
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, () and sipahis. Fewer janissary recruits and a decreasing population and slave intake compelled the to expand and exploit the interior under their control. In the three (provinces), the relied on local notables since they had a limited number of janissaries. This allowed the to become . 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 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,
Mohammed Bektach took the opportunity afforded by the
War of the Spanish Succession to send
Mustapha Bouchelaghem 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 |alt=Bronze cannons displayed in an open area
Baba Mohammed ben-Osman became 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 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 , re-asserted Regency authority as far south as Touggourt. During his rule, Algiers maintained its military superiority over its eastern and western neighbors. The 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 corsair activity in the Mediterranean. The assault's disastrous failure dealt a humiliating blow to the Spanish military. This was followed by a first bombardment by Spanish admiral
Antonio Barceló's fleet in
1783 and a second, much tougher one in
1784, also ending in defeat. Led by
Mohammed Kebir in 1791, Algiers launched a
final assault on Oran, which was retaken after negotiations between
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
Mustapha Pasha by the 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 . 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. Tunisia freed itself from Algerian suzerainty after the wars of
1807 and
1813, when a peace treaty was signed between the two regencies in 1817.
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
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.
Ali Khodja, with support from the and the Kabyles, disposed of the turbulent janissaries and transferred the seat of power and the treasury of the regency from the to the
Casbah citadel in 1817. The last 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 attacking Algiers by sea, 3 July 1830,
Antoine Léon Morel-Fatio (Palace of Versailles)|alt=Ship attacking a walled city from its harbor 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 Hasan III Pasha without interest. Algiers would even object to 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 . In 1827,
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 , 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 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 19thcentury French historian Henri de Grammont said: 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 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. Ruedy believes that the early 18th-century could have led to a 19th-century nationalization of the Algerian regime, but the French conquest put an end to this evolution. He 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 ==