Regency of Algiers

The Regency of Algiers (دولة الجزائر, ایالت جزایر غرب) was a largely independent early modern Ottoman tributary state on the Barbary Coast of North Africa between 1516 and 1830 established by the corsair brothers Aruj and Hayreddin Barbarossa, also known as Oruç and Khayr ad-Din. The Regency was an infamous and formidable pirate base that plundered and waged maritime holy war on European Christian powers. Ottoman regents ruled it as heads of a military oligarchy of janissaries and corsairs.

The Regency emerged in the 16th-century Ottoman–Habsburg wars as a unique corsair state that drew revenue and political power from maritime strength. In the early 17th century, when war ended between the Habsburg and Ottoman empires, the Barbary corsairs were capturing merchant ships with their crews and goods from the Spanish Empire, Kingdom of France, Kingdom of England and Dutch Republic. When the Ottomans could not prevent these attacks, European powers negotiated directly with Algiers and took military action against it. The Regency held significant naval power in the 16th and 17th century well into the end of the Napoleonic wars despite European naval superiority. This made Algiers a corsair economy that took the shape of notorious institutionalised privateering and dealt substantial damage on European shipping, taking captives for ransom, plundered booty, hijacked shios ships and later demanded regular tribute payments that went to the rich and bustling rich city of Algiers, where the Barbary slave trade reached an apex. After the janissary coup of 1659, the Regency of Algiers became a sovereign military republic whose rulers were thenceforth elected by the council known as the diwân, rather than appointed by the Ottoman sultan as before.

Wars over territory with Spain and Maghrebi states erupted in the 18th century, but Mediterranean trade and diplomatic relations with European states increased as Algiers gained political stability. The Regency prospered under Baba Usman Mohammed (1763-1791). The American Revolution meant that British tribute payments no longer covered U.S. shipping traffic in the Mediterranean, and the French Revolutionary and Napoleonic wars allowed large outbreaks of Algerian privateering. Increased demands from Algiers for tribute caused the Barbary Wars, in which American, British and Dutch navies engaged the Barbary corsairs at the beginning of the 19th century, and decisively defeated Algiers 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 French colonial rule until 1962.

Barbarossa brothers
At the end of the Reconquista about 100,00 Moriscos arrived in Melilla and Fez under King Boabdil in 1492. The Spanish Empire took several ports on the North African coast and established walled and garrisoned strongpoints they called presidios there. The Spanish took Oran in 1509, then Tripoli in 1510. and made Hafsid Tunis a vassal state. The Spanish then controlled caravan trade routes from western Sudan, Tripoli and Tunis in the east and Ceuta and Melilla in the west, passing through Béjaïa, Algiers, Oran and Tlemcen. Control over this gold and slave trade fed the Spanish treasury.

Ottoman corsair brothers Aruj and Hayreddin Barbarossa came to North Africa at the request of the citizens of Béjaïa, who asked for help after Spain took the city in 1512, then those of Jijel offered to make Aruj king after corsairs appeared there with a load of wheat in a time of famine. Answering pleas for help from its inhabitants, the brothers were able to take Algiers in 1516, execute its emir, Salim Al-Tumi, and repel a Spanish attack led by Diego de Vera. Aruj continued his conquests in central Algeria, but was killed in Tlemcen in 1518.

His brother Hayreddin became Sultan of Algiers at the end of 1519. After repelling another Spanish attack under Hugo de Moncada, he realized that he needed Ottoman support to maintain his possessions around Algiers. In October 1519, a delegation of Algerian dignitaries and ulamas went to Ottoman Sultan Selim I proposing that Algiers join the Ottoman Empire. Under Suleiman I, Algiers officially became an eyalet of the Ottoman Empire in the spring of 1521, Istanbul viewed the idea of integrating a territory so far away and so close to Spain as risky, but Hayreddin was appointed Beylerbey lit. 'Prince of princes' and the Ottomans sent him home at the head of 2,000 janissaries.

Supported by the Kabyles of Beni Abbas, retook Algiers again in 1525 after defeating the Kabyle prince of Kuku, then in 1529 destroyed a Spanish fortress known as the Peñón of Algiers that had been threatening the port. Hayreddin used its rubble to build the port of Algiers, and made it the headquarters of the Algerian corsair fleet. Later he conducted several raids on Spanish coastal lands, vanquishing the Genoese fleet of Andrea Doria in Cherchell. He also rescued over 70.000 Andalusian refugees from the Spanish inquisition, and brought them to Algeria, where they contributed massively to the flourishing culture of the Regency.

Expansion of Algiers
Under Heyreddin's successor Hasan Agha, Algiers was able to repel an Imperial naval attack led by Emperor Charles V in October 1541. Reports of Spanish losses ranged up to 12,000 men, including more than 150 ships and 200 cannons, which the Algerians salvaged for use in the fortifications of Algiers. Algerian losses didn't exceed 200 men. As a result, Algiers was able to consolidate and expand its territories. This was undertaken by Hayreddin's son Hasan Pasha and Salah Rais, who conquered Touggourt and Ouargla in 1552, removed Spanish goveror de Peralta's troops from Bejaia in 1555, then thwarted Count Alcaudete's expedition to Mostaganem in 1558. The two beylerbeys also led campaigns against Saadian Morocco, which was allied with Spain, decisively defeating it in 1551 in Tlemcen, advancing as far as Fez in 1554 then Tlemcen again in 1557. Beylerbey Uluç Ali Pasha moved against Tunis in 1569, then took it from John of Austria's 8000 Spaniards in 1574. Uluç Ali's corsair ships saved the Ottoman fleet from total disaster in the battle of Lepanto in 1571.

Under Hassan Veneziano Pasha, Algerian privateers ravaged the Mediterranean and made the waters unsafe from Andalusia to Sicily. Their power reached as far as the Canary Islands. After the capture of Fez in 1576, Ottoman Algerian troops ventured overland into the Sahara, reaching Tuat in 1578 and temporarily halting Saadian advances there.

Algerian autonomy
Privateering was so widespread in the early 17th century that the period became known as a "golden age of privateering". By 1600, Algerian corsairs had adopted the square-rigged sailing ships introduced by Dutch corsair Simon Dansa and begun to rely less on Christian galley slaves. The expulsion of the Moriscos from Spain also gave the corsairs reinforcements, with whom they weakened and inflicted painful wounds on Spain, ravaging its mainland and territories in Italy, where the corsairs took people prisoner en masse. The corsairs traveled as far as Iceland in 1627 and Ireland in 1631. Algiers became a market for captives and plundered goods bought by merchants from all over the Mediterranean, making Algiers a wealthy thriving city with over 100,000 inhabitants in the 17th century.

Algiers also became increasingly independent of the Ottomans in this period. In the 16th century, France signed capitulation treaties with the Ottomans that established the Franco-Ottoman Alliance and gave the French trading privileges in Algiers. They built a French trading center known as the Bastion de France, which exported coral legally under its monopoly and wheat, in that case illegally. The Bastion was fortified and turned into a military supply base and a center of espionage, much to Algerian discontent. When the Ottoman expanded French privileges, destroyed the Bastion in 1604. The Porte had him assassinated and replaced by the more compliant Pasha, but the janissaries revolted in 1606 and tortured that pasha to death. Algiers and Istanbul had different views of relations with France.

After the battle of Lapento, the corsairs broke loose from the Ottoman Porte and began preying on ships from countries at peace with the Ottomans. The European converts to Islam, known in Europe as renegades and turned Turks, formed mostly the tai'fa (council of corsair captains) and sought to fulfill the interests of Algiers only. Corsair captain Ali Bitchin became admiral of the Algerian navy in 1621 and conducted successful raids against Spanish harbors. After the Ottoman sultan refused to compensate Algiers for its losses against the Venetians in Valona, Ali Bitchin refused to answer a summons from the sultan to join the Cretan war. He then died suddenly in 1645.

Foreign relations
Algiers' refusal to follow Ottoman foreign policy led European powers to negotiate treaties with it directly on trade, tribute and slave ransoms, recognizing Algerian autonomy despite its formal subordination to the Ottomans. Algiers used privateering as a foreign policy tool, playing its European counterparts against one other, hunting merchant ships and prompting European states to conclude peace treaties and obtain Mediterranean passes to secure lucrative cabotage business at the expense of their Continental rivals.

This conferred on Algerian rulers internal legitimacy as "champions of jihad" and, according to early modern European authors, international respect for their Regency's legal sovereignty as an established government, despite still being a "nest of Pirates". Dutch jurist Hugo Grotius (1583–1645) noted that "Algiers exercised the jus ad bellum of a sovereign power through its corsairs". 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." Algiers first established relations with France in 1617, with a treaty signed in 1619, and another in 1628. These mostly concerned 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.

England and the Dutch Republic went through the same diplomatic process with Algiers as France. After earlier engagements in 1621 and 1624, Algerian corsair ships took thousands of English and Dutch sailors to the Algerian slave market, resulting in intermittent wars followed by long lasting peace treaties that varied between tribute payment and weapon supplies.

Under Louis XIV, France built a strong navy to face off the corsairs who raided Corsica and were everywhere in the waters off Marseilles in the late 1650s. It launched multiple campaigns against the Regency. These were carried out first in Jijel and Collo in 1664, then 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 King Louis.

Maghrebi wars
Algiers entered a period of peaceful relations with Europe. The resulting decline in privateering forced Algiers to seek other sources of external revenue. Dey Hadj Chabane set his sights on his Maghrebi neighbors, Tunis and 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 opposition to Algerian hegemony and its ambitions in the Constantine region, the Algerian dey took the opportunity provided by the 20 years of civil war between Murad II Bey's sons to invade in 1694 and put a puppet bey on the throne. A vengeful Murad III Bey of Tunis allied with Morocco and unleashed the Maghrebi war in 1700. He lost however, and the Muradid dynasty was replaced by the Husainid dynasty, which failed to free Tunis from Algerian suzerainty in 1735 or 1756. It did not succeed until the early 19th century.

Alawi Morocco opposed the Ottomans with determination. It also had ancient ambitions in western Algeria and 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 ended in failures. Moulay Ismail was forced to accept the Moulouya River as his eastern border with Ottoman Algeria.

Dey-Pashas of Algiers
Determined to remove the Spanish from Oran, Algerian Dey 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 Bouchelaghem Bey could not resist the Duke of Montemar's forces who recaptured the city. Internally, Algerian Dey Baba Ali Chaouch ended Ottoman influence by taking the Pasha title for himself in 1710. When the Habsburg monarchy concluded the peace of Passarowitz with the Ottoman Empire in 1718, Dey Ali Chaouch had Austrian ships captured despite the treaty, and refused to pay compensation to an Ottoman-Austrian delegation, thus confirming the independent foreign policy of Algiers despite its nominal subordination to the Ottoman Empire.

On 3 February 1748 Dey Mohamed Ibn Bekir issued what is known as "The Fundamental Pact of 1748" or "Pact of trust", 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 and sipahis.

Muhammad ben Othman Pasha became dey in 1766. He ruled over a prosperous Algiers for a full quarter-century until he died in 1791, undertaking several public works, such as fortifications around the city of Algiers, and a municipal water supply and fountains. He also strengthened the navy, kept the janissaries in check and developed trade. His efforts to the pacify the territory of the regency were fruitful, as his governor of Constantine Salah Bey managed to re-assert authority as far south as Touggourt.

The dey was active in international affairs, and 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. But it failed and Denmark was forced to pay heavy war compensations and gifts to Algiers.

In 1775 the Irish-born admiral of the Spanish Empire Alejandro O'Reilly led an expedition to knock down pirate activity in the Mediterranean. The assault's disastrous failure dealt a humiliating blow to the reorganized Spanish military. This was succeeded by two bombardments, by Antonio Barcelo 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 with the Spanish Count of Floridablanca. This marked the end of almost 300 years of "holy war" between Algeria and Spain.

Internal crisis
At the beginning of the 19th century, Algiers was plagued by political unrest and economic problems. Algerian reliance on Jewish merchants to trade with Europe was so great that a crisis caused by crop failure led to the assassination of Dey and the death of Jewish merchant Naphtali Busnash. Public unrest, a pogrom and successive coups followed, beginning a 20-year period of instability. The Moroccans incited a massive Sufi Darqawiyya revolt in the east and west of the regency, which was quelled with great difficulty by the governor of Oran, Osman Bey. In the meantime, janissary revolts were frequent due to payment delays, leading to military setbacks, as Morocco took possession of Figuig in 1805, Tuat and Oujda in 1808, and Tunisia freed itself from Algerian rule after the wars of 1807 and 1813.

Barbary Wars
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. Algerian vessels attacked American merchant ships in 1785, claiming they were no longer under British protection and asserting an Algerian right to search and seizure. 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. But Algiers was defeated in the Second Barbary War by the United States in 1815, when U.S commodore Stephen Decatur's squadron killed Algerian admiral Raïs 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 no longer tolerated Algerian raids and viewed them as a "barbaric relic of a previous age." This culminated in August 1816, when Lord 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. The last deys of Algiers attempted to nullify the consequences of the previous Algerian defeats by reviving buccaneering and resisting a British attack on Algiers in 1824, creating the false belief that Algiers could still defend itself against a divided Europe.

French invasion
During Napoleon's time, Algiers benefited greatly from Mediterranean trade and France's massive food imports, much of which were bought on credit. In 1827, Hussein Dey demanded that the restored Kingdom of France pay off a 31-year-old debt dating from 1799 for providing supplies to the soldiers of Napoleon's campaign in Egypt.

The response of the French consul Pierre Deval displeased Hussein Dey, who hit him with a fly whisk and insulted him as 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 June 14, 1830. Algiers surrendered on July 5, and Hussein Dey went into exile in Naples,

This marked the end of the Regency of Algiers.

Political status
The Regency of Algiers emerged from the Ottoman–Habsburg wars in the western Mediterranean as the center of Ottoman rule in northwest Africa after 1516. As a bastion of the Ottoman Empire in its competition with the West for control over the western Mediterranean, Algiers became the headquarters of probably the greatest janissary force in the empire outside Constantinople. Much like the island of Malta, which served as a base for Christian pirates and privateers, the Barbary coast Regency was home to the Muslim pirates of the region. "Aruj effectively began the powerful greatness of Algiers and the Barbary", wrote, a Spanish Benedictine from Sicily who was held captive in Algiers in 1577-1580. Algiers underwent numerous political developments with the transformation of the Ottoman Empire from strength and expansion to weakness and stagnation as a local government that accepted Ottoman legitimacy.

1516: State of Algiers established
Aruj set out to build a powerful Muslim state in the central Maghreb at the expense of its principalities. He sought the support of the religious authorities, in particular the popular maraboutic and Sufi orders. He conveyed his vision to them of the government structure he envisioned, the Odjak of Algiers, a military republic like that of the island of Rhodes occupied by the Christian Knights Hospitaller.

The Odjak administrative structure and the religiously sanctioned power of Aruj were freely accepted by the military, with the scimitars of Turks and Christian renegades behind him. They made his authority absolute, and accepted without resistance by the population.

Power was in the hands of the Odjak. Native Algerians and coulouglis were excluded from high government positions, although they could still hold legal and police powers within Algiers as mayors.

Hayreddin's consolidation


The new pasha, Hayreddin Barbarossa, inherited his brother's position unopposed. A shrewd statesman and a great captain, he designed a strategy for the Algerian state's existence. He pledged allegiance to the Sublime Porte to obtain its support against the Spanish Empire and the rebellions fomented by his opponents, and had himself recognized by the sultan as pasha, a regent with the title of beylerbey.

To manage state affairs and govern the country, he relied on the carefully chosen janissary members of the diwân council. Even if they reflected the Ottoman ruling class, the leaders and members of the diwân still referred to themselves as Algerians, Barbarossa established the military basis of the Regency, formalised corsairs into a well-organized institution that recruited, financed and operated the infamous tai'fa of raïs. It became the model for Barbary corsairs in Tunis, Tripoli and the Republic of Salé.

The Barbarossa brothers' campaigns paid to fortify and develop the city of Algiers into a new capital for the growing naval power of the Algerian state.

Beylerbeylik period (1519–1587)
The foreign policy of Algiers in its first few decades aligned completely with that of the Ottoman Empire, since the country and its affairs were in the hands of Ottoman beylerbeys. They were corsair captains of Algiers appointed by the Ottoman sultan. The beylerbeys often remained in power for several years, exercising authority over Tunis and Tripoli, and led Ottoman expansion in the Mediterranean. Because of their experience in fleet command, some beylerbeys became Kapudan Pasha. Algiers became the most successful port in the Maghreb and a very cosmopolitan city. European powers portrayed it as the "scourge of Christendom" and a 16th-century "rogue state". The beylerbeys acted as independent sovereigns despite acknowledging the suzerainty of the sultan. De Haëdo called them "Kings of Algiers". The janissary-elected Hasan Corso openly rebelled in 1556. A Corsican convert, he refused to submit to the pasha sent by Constantinople. Aided by the corsairs, the pasha murdered Hasan Corso, but in turn the janissaries murdered the pasha. The ensuing instability prompted Suleiman the Magnificent to send Hasan Pasha to Algiers, who relied heavily on native troops like other beylerbeys.

The "timar" system of granting fertile lands to Ottoman sipahis was not applied in Algiers. Instead the beylerbeys sent tribute to Constantinople every year, after meeting the expenses of the state. In return, Constantinople provided a steady stream of janissaries. The sultan gave the ruler of Algiers a free hand but expected Algerian ships to help enforce Ottoman foreign policy if need be. Eventually the internal and external interests of Algiers and Constantinople diverged on the matter of privateering, over which the Porte had no control.

Pashalik period (1587–1659)
Fearful of the growing independence of the rulers of Algiers, the Ottoman Empire abolished the beylerbeylik system in 1587, and put the pashalik system in its place, dividing the Maghreb countries into three separate regencies: Algiers, Tunis and Tripoli. The ensuing period of nearly 72 years was known for political instability; power formally rested in the hands of governors that Constantinople replaced every three years. However, this was also considered the "Golden Age of Algiers" due to its massive corsair fleet. By the end of the 16th century, janissaries were allowed to join corsair ships, strengthening the combat effectiveness of the Algerian fleet, and filling its coffers with riches thanks to the intensified privateering.

The Algerian janissary Odjak grew stronger, more autonomous, and more influential. In 1596, led a revolt in Algiers in an effort to overthrow the Odjak. Although the revolt spread to neighboring towns, it ultimately failed. The janissaries organized themselves in their diwân (military council), the effective government of Algiers by 1626 at the expense of the pashas, allowing it to conclude diplomatic treaties with the Dutch republic in 1622, and France in 1628. The pasha began official acts with the formula: "We, pasha and diwân of the invincible militia of Algiers".

The corsairs for their part organized themselves into a tai'fa, a council of corsair captains tasked with privateering operations, which became the main driver of Mediterranean diplomacy with European powers. The tai'fa ignored the Ottoman Kapudan Pasha and relied on piracy and captivity to keep Algiers financially and politically independent from Constantinople.

The later pashas sent by the Porte were constantly torn between the demands of the corsairs and of the Odjak. 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 Porte's appointed pashas back to Constantinople.

Janissary revolution: Agha regime in 1659
and the janissaries opposed the Ottoman capitulation treaties in 1604. Aversion to the Sublime Porte increased. The pashas sent by the porte worked to multiply their wealth as quickly as possible before the end of their three-year term in office. As long as this was their main goal, governance became a secondary issue, and the pashas lost all influence and respect.

In 1659, Ibrahim Pasha pocketed some of the money the Ottoman sultan sent the corsairs to compensate them for their losses in the Cretan War. This ignited a massive revolt and he was arrested and imprisoned. Taking advantage of this incident, Khalil Agha, commander-in-chief of the janissaries of Algiers, 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. They assigned executive authority to Khalil Agha, provided that his rule not exceed two months. They put legislative power in the hands of the diwân council. The sultan, forced to accept the new government, stipulated that the diwân pay the Turkish soldiers stationed there. Khalil Agha launched his rule by building the iconic Djamaa el Djedid mosque. The era of the Aghas began and the pashalik became a military republic.

Deylik period (1671–1830)
In 1671 Sir Edward Spragge's squadron destroyed seven ships anchored in the harbor at Algiers, and the corsairs killed Agha Ali (1664–71). The three previous heads of the janissaries since 1659 had also all been assassinated. Caught unaware, janissary leaders wanted to appoint another agha of a sovereign Algiers, but given the lack of candidates, they and the corsairs resorted to an expedient Ali Bitchin Rais had used in 1644–45. They entrusted both the Regency and the responsibility for its payroll to an old Dutch rais named Hadj Mohammed Trik.

They gave him the titles of Dey (maternal uncle), Doulateli (head of state) and Hakem (military ruler). After 1671, the deys led the country, but their power was checked by the Diwân council. This institutionalization of the relationship between holders of military and financial power and formal diplomatic recognition from European states, effectively made Algiers de facto independent of the Ottoman Empire.

The pashas plotted in the shadows, stirred up conflicts and fomented sedition to overthrow the unpopular deys and regain some of their lost authority. From 1710 on the deys assumed the title of Pasha at the initiative of Dey Baba Ali Chaouch (1710–1718), and no longer accepted representatives from the Porte. They also imposed their authority on the janissaries and the raïs. The latter did not approve of treaty provisions which restricted privateering, their main source of income, and remained attached to the external prestige of the Regency. But European reactions, new treaties guaranteeing the safety of navigation and a slowdown in shipbuilding considerably reduced their activity. The raïs rose up and killed Dey Mohamed Ben Hassan in 1724.

The new dey, Pasha (1724–1732), quickly restored order and severely punished the conspirators. He managed to stabilize the Regency and fight off corruption. The diwân was gradually weakened in favor of the dey's cabinet, known as "powers", resulting in more stability through the implementation of a sort of bureaucracy. Relations with Constantinople became formalized; the sultan was assured of Algerian "obediance" in return for recruiting troops from Ottoman lands, yet the dey was not bound to Ottoman foreign policy.

In the three beyliks (provinces), the beys relied on local notables since they had a limited number of janissaries. This allowed the coulouglis linked by blood ties to the great indigenous families to become beys. Supported by the coulouglis and the Kabyles, Dey Ali Khodja disposed of the turbulent janissaries, and transferred the seat of power and the treasury of the regency from the Djenina Palace to the Casbah citadel in 1817.

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.

Administration
The administrative apparatus of Ottoman Algeria organized itself through borrowed Ottoman systems, maintained by regular recruitment of military personnel from Ottoman lands in exchange for tribute sent to the Porte, and local traditions inherited from the Almohad Caliphate and adopted by the Marinids, Zayyanids, and Hafsids.

The corsairs waged holy war against the Christians through the use of gunpowder and the resources of the Ottoman Empire, and exploited their political and military superiority to defeat weak local emirates and impose a foreign elite on a divided Maghrebi society. Politics in Algiers centered on the Ottoman military elite autonomous from tribal and self-ruled indigenous society in the countryside, which still gave allegiance and paid taxes to a military authority that respected their marabouts and defended them against Christian powers.

Algerian stratocracy
Some contemporary observers described the Regency of Algiers as a "despotic, military-aristocratic republic", since the executive, legislative and judicial powers were all held by the military body of Algiers. The Marquis d'Argens compared it to the Roman Empire under Nero and Caligula and called it a republic, even though he also called the dey of Algiers a king.

Montesquieu considered that the Algerian government consisted of an aristocracy with republican and egalitarian characteristics, elevating and deposing a despotic sovereign, while historian Edward Gibbon considered Algiers a "military government that floats between absolute monarchy and wild democracy". It was unique among Muslim countries in having limited democracy and elected rulers. Democracy was at the time extremely unusual in 18th-century Europe, and Jean-Jacques Rousseau found Algiers impressive in this respect. 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), legitimized by Islam and by jihad.

Algerian historian Lamnouar Merouche described the janissary corps of Algiers as a "collective regime", a "sovereign community" and a "military republic". 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
French historian Charles-André Julien wrote that the dey of Algiers was head of an elective but absolute monarchy—a de-facto constitutional autocracy. He was charged with 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 still limited by the corso captains and the diwân of janissaries, since any member of either body could aspire to become dey. His fortune came from his civil list that didn't exceed that of the highest paid member of the janissaries, and although he could still receive presents from consuls, beys and shares from privateer booty, his fortune reverted back 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. However, the dey was elected for life and could only be replaced on his death. Overthrowing the current leader was thus the only path to 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 (except the agha), who formed the "Council of the Powers" to govern Algiers:


 * : treasurer in charge of finances and the public treasury. Often also translated as vizier of the dey, or "principal secretary of state".
 * : Commander-in-chief of the Odjak and minister of internal affairs, he was also responsible for governing the  region of Algiers.
 *  : Minister of the navy and foreign affairs, he was the Kapudan rais or head of the tai'fa of rais. He was also responsible for matters relating to weapons, ammunition and fortifications.
 * : 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 (treasurer).
 * Bait al-Maldji: Responsible for the state domain (makhzen) and for rights devolved to the treasury such as vacant inheritances, registrations and confiscations.

The dey also nominated muftis (Islamic jurists) as the highest echelon of Algerian justice.

Diwân council
The diwân of Algiers was established in the 16th century by Hayreddin Barbarossa and seated first in the, then at the kasbah citadel. This assembly, initially led by a janissary Agha, evolved from an administrative body, the Odjak of Algiers, into the country's primary administrative institution. The diwân held true power in the Regency, and by the mid-17th century elected the head of state.

The diwân expanded into two subdivisions:


 * The private (janissary) diwân (diwân khass): Any recruit could rise through the ranks, one every three years. Over time, he would serve among 24 janissary bulukbasis (senior officers), who voted on high policy. The commander-in-chief or "Agha of Two Moons" was elected for a term of two months as president of the diwân through a system of "democracy by seniority". The Agha was the holder of the Fundamental pact ('Ahad aman) of 1748. 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." During the Agha period (1659–1671) he was the ruler of the Regency, holding the title of Hakem.
 * The public, or Grand Diwân (diwân âm), composed of 800 to 1500 Hanafi scholars and preachers, the raïs, and native notables. At the beginning of their mandate, the deys consulted the diwân on all important questions and decrees. This council in principle met weekly, depending on the dey. By the 19th century, he could ignore the diwân whenever he felt powerful enough to govern alone.

Territorial management


The Regency was composed of various beyliks under the authority of beys (vassals):


 *  included the city of Algiers and nearby ports
 * The beylik of Constantine in the east, with its capital in Constantine
 * The beylik of Titteri in the centre was established in 1548, with its capital at Médéa.
 * The beylik of the West was established in 1563, with its capital at Mascara, then Mazouna in 1710, and Oran in 1791

These beyliks were institutionally divergent and enjoyed significant autonomy.

Ottoman administration of Algeria relied on Arab makhzen tribes. Under the beylik system, the beys divided their beyliks into chiefdoms. Each province was divided into outan, or counties, governed by caïds (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. At their forefront were 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.

Algerian slave ransom economy
Algerian corsairs raided coasts and seized ships, capturing many people on land and at sea from Mediterranean shores to the Atlantic high seas. Prisoners were brought to the slave market in Algiers, through which passed between 25,000 and 36,000 slaves of many nationalities, over one million European slaves total in the entire early modern period, a trade which made slavery the cornerstone of the Barbary economy.

After they were paraded naked, examined and inspected to assess their qualities, social position and value, the captured individuals were divided into three groups:

Government-owned captives were lodged in prisons called "bagnos". Six main prisons existed in Algiers. The privately owned captives were lodged inside houses or larger prisons funded by slave owners, often rich individuals or privateering companies.
 * Those who were believed ransomable: Usually rich and better referred to as "captives", they were an important source of revenue. The owners of these captives spared them the hardest tasks to preserve their value, as they were to be ransomed as quickly as possible. According to Julien: "The captive was a piece of merchandise which it was to no one's interest to damage."
 * Those who were not believed ransomable: A poorer class and lower-priced, like their Muslim counterparts in France, they often became galley slaves or were assigned to forced labor like moving rocks. Some were chosen as domestic slaves for their masters' households.
 * Those who were freed without ransom, because of exchanges for Muslim captives, honoring past agreements between states, or lost wars.

In Spain, France and the Dutch republic, ransom funds were drawn from the captive's family, donations from the state, or religious orders of the Catholic church who negotiated in Algiers for the captives. Ransoming missions such as the Trinitarians and the Mercedarians were instructed to identify captives who were in danger of apostacy, captives whose family and friends had raised money, and valuable individuals before a ransom agreement was reached. The 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 early 16th century. In the 17th century however, the redemptionist missions paid 100 and 200 to 300 pounds or more for their freedom. Persons of distinction were almost priceless: the governor of the Canary Islands bought himself back in 1670 for 60,000 pounds.

After ransom was paid, an additional fee for customs duties was still needed, over fifty percent of the agreed ransom. These fees broke down as follows:


 * 10% for customs
 * 15% for the pasha or dey
 * 4% for the khaznaji (Secretary of State)
 * 7% for the wakil Al-kharaj (harbourmaster)
 * 17% for the prison guards

Slaves who became master carpenters, and built or repaired ships, could not be ransomed for any price.

Mandatory royalties and gifts
Algiers imposed royalties on its European trading partners in exchange for freedom of navigation in the western Mediterranean, and gave the merchants of those countries special privileges, including lower customs duties. 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 were also imposed on Bremen, Hanover, and Prussia, in addition to the Papal States on some occasions.

External trade
Algerian wheat exports to Europe replaced privateering as its primary source of income in the 18th century, and become the core factor in trade relations between Algiers and European countries like Britain, Genoa and France. The French in 1741 controlled French wheat imports from the Algerian Constantinois. According to Merouche: "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. It is the century of wheat which would succeed the century of privateering"

Algerian exports were generally transported by sea, mostly to Marseille. This 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 carried out by the prominent Jewish families of Bacri and Busnash, who settled in Algeria in 1720. After acting as mediators in the Christian slave trade in the heydays of privateering, they managed to entangle 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 become 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, 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 to as far as Tafilalt in Morocco and Timbuktu in the Sudan. The former brought salt, spices, Moroccan leather, silk and gun wood, while the latter furnished 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)." However, trade didn't grow; the state imposed monopolies to guarantee revenues, and imposed duties on exports and imports, and military assets considered essential to the defence of Algiers were strictly regulated.

Internal trade
Internal trade was extremely important due to the makhzen system. Overland trade used animals to transport goods, mainly on their backs, and carts could be used on suitable roads. The many official posts of the Odjak and the makhzen tribes provided security. In addition, caravanserais, locally known as fonduk, gave travelers a place to rest. Products such as wool that city-dwellers needed came in from the tribal interior and were traded between cities in markets known 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. The tribes also settled in urban marketplaces where they bought imported products such as jewelry, fabrics and pottery. Jewish intermediaries helped furthering such exchanges between cities and countryside.

Control over the Sahara was often loose, but Algiers' economic ties to it were very important, and Algiers and other Algerian cities were among the main destinations of the trans-Saharan slave trade. Donald Holsinger wrote that in the late eighteenth 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 Muhammad ibn'Uthman who ruled at Algiers from 1766 to 1791." This, he says, was "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 cushr (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 (compensation), based on a rough estimate of their wealth. In addition, rural populations also paid a tax known as lazma (obligation) or ma'una (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 gifts (dannush), 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 (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 were to 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 in cash, half that in jewelry, four horses, fifty black slaves, woollen tilimsan garments, Fez silk garments, and twenty quintals each of wax, honey, butter, and walnuts. Dannush from the Eastern Province was larger and included Tunisian products such as perfumes and clothing.

Agriculture
Agricultural production eventually benefited the Regency even more than privateering. 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 termed fahs. Located near the main towns, these lands were granted to Turkish military personnel, coulougli families, makhzen tribes and urban notables under the azl system. Fahs lands were cultivated by tenant farmers who received a fifth of the harvest under the khammas sharecropping system for common land. The Metija, breadbasket of Algiers, provided it with various fruits and vegetables. Algerine wine was particularly sought after in Europe for its quality.

Vast areas of Algeria's land were known as arsh, where animal husbandry predominated. Historian 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." The melk lands were possessed and heritable by individuals and were under customary Berber law.

Algeria's agricultural wealth came from the quality of the cultivated land, but also from agricultural techniques that used all the means of the time (ploughs dragged by oxen, donkeys, mules, or camels) and irrigation and ingenious water systems that supplied small collective dams. 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, the majority 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 an annual migration to summer pastures.

Manufacturing and craftsmanship
Manufacturing was restricted to shipyards, which built frigates out of 300 to 400 tons of oak sourced from Kabylia or supplied by the Ottoman Empire. The smaller ports of Ténès, Cherchell, Dellys, Béjaïa and Djidjelli built shallops, brigs, galiots, tartanes and xebecs used for fishing and to 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 centers of great craftsmanship and commercial activity. Urban people in 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, workshops, shops, and stalls. Tlemcen had more than 500 looms. Artisans were prevalent even in small towns with close ties to rural areas.

Society
Tribal organizations were only one affiliation or group that individuals might have felt they belonged to. Many Algerian texts written since the 17th century speak of the watan al jazâ'ir (country of Algeria), and use the term "our homeland". Such phrases suggest an incarnation of the state governance intermediate between tribal anarchy and the modern nation-state. A distinction was made between:


 * State or Khassa composed of Ottoman officials, Arab tribal lowlanders known as makhzen, and Berber highlanders known as zwawas.
 * Society or Ra'iya comprised diverse national religious, tribal and urban communities.

Urban population
Around 10,000 Turks made up the ruling class of Algerian society, including senior officials, politicians, administrators and soldiers. There were no harems in Algiers, since its elected rulers did not require heirs and also were often challenged. However a class of coulouglis emerged, offspring of Turkish soldiers and Algerian women, as well as indigenous Algerians, Blacks, urban immigrants from Andalusia and a Jewish minority. Social exercise of the Muslim faith prevailed in every aspect of life, as both Turks and Moors were zealously religious. Guilds and quarters within cities, headed by 'amins, regulated major trades, provided for most of the residents' needs, hedged against emergencies, and strengthened community solidarity. Public business was carried out in both Arabic and Osmanli.

The bourgeoisie of the coastal cities owned the best homes and land. The 6% of the population who lived in cities had access to springs, fountains, bath houses, shops, bazaars and Moorish coffeehouses, where friends could chat over mint tea. These well-appointed and decorated places of rest and idleness overlooked the sea in the lower town, or were strategically located at certain crossroads.

The fraternal and familiar relations in the hierarchical system of the urban society of Algiers didn't leave room for class rivalry between the wealthy upper class, consisting of the few great merchants, and the poorer lower class, composed of shopkeepers, craftsmen and scholars.

Social structures
In precolonial Maghreb, the tribe was a primary social and political structure, based upon family rather abstract principles. Competition among tribes for land and water was institutionalised through a sense of unity based on consanguinity, shared Islamic faith and their economic need to trade with each other, preventing dangerous social frictions and allowing union against external threats.

This system persisted under the Regency. The traditional isolation of the city from the hinterland ceased, ending the traditional divide between urban and rural areas in the central Maghreb. Nineteenth-century ethnologist Émile Masqueray compared the "Berber city of the Maghreb", to the city-state of Antiquity. Cities and villages articulated their own organizations within the tribal systems and confederations. The cities, made up of families, left room for individuality. Although they depended on tribal society, the cities distanced people from tribal ways. However, the tribe did not disappear, but adapted to the city framework, and its importance varied from region to region. It remained relatively important in the Aurès, for example.

A complex link of interdependencies developed between tribes and the state, as tribes adapted to government pressure. They received social assignments, for example the Biskri Berbers were charged with street maintenance and guarding quarters, the Mozabite Ibadi theocracy was respected and represented in Algiers, and the migrating Berbers of Kabylia and Aures were frequently employed in Algiers.

The state was sometimes necessary for the consolidation of the tribes. These relations even seemed complementary. Makhzen tribes derived their legitimacy 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 siba tribes were dissidents who opposed taxes, which reduced their surplus production. But they still depended on market access organized 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.

Tribal aristocracy
The political authority of the tribes often depended on either their military strength or their religious lineage. These two aristocracies, the religious brotherhoods who dominated the west, and the  strongman families of the east, often opposed one another. Algerian society had three forms of aristocracy in all:


 * djouads were warriors who often headed powerful tribes or tribal confederations that remained autonomous, like the Berber Mokranis, Beni Abbas or the Ben-Gana family of the Arab Hilalian confederations in the eastern beylik, who were related to Ahmed Bey of Constantine. The Regency often saw these tribes as allies.
 * sharifs were a religious nobility who claimed descent from the prophet Muhammad, and often members of the Naqib al-ashraf institution of the Ottoman Empire. The author 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.
 * marabouts like the Awled Sidi Cheikh ruled the western oases until the 19th century. They were a principality, a polity based on princedom, not themselves a central power, but vassals of Algiers. Nor were they a dynasty, but rather a political confederation, headed by a riyasa (chiefdom) of the Awlad Sidi Cheikh maraboutic brotherhoods. The marabouts also shared in the booty of the corsairs.

Education
The large number of schools dominated by an otherworldly religious ethos indicates that intellectual life in Algiers lacked not innovation and reform, but institutions or organization. The dominant political culture hastened the decline of intellectuals, not just traditionalism.

Education in Algeria mainly took place in small primary schools or kuttabs that focused on teaching basic reading, writing and religion, especially in rural areas. Local imams, zawiyas, marabouts, and elders provided most of the teaching. Secondary and tertiary education in the madrasas of the larger cities, was assured by instructors who often occupied legal positions as qadis or muftis, and was often maintained through waqf and central government funding. The students would receive education on Islamic jurisprudence and medieval Islamic medicine. After finishing their instruction, they could either have a licence to become teachers, join the legal body of Algiers as qadis and muftis or pursue highter education in the universities of Tunis, Fez or Cairo.

Initially, western Algeria, especially Tlemcen, was the main center of learning, but schools and universities there declined due to neglect. Abu Hammu II's madrasa especially fell into complete ruin, as the military and naval Ottoman elites' strong belief that northern Christendom needed to be prevented from military expansion into the Maghreb hampered the development of learning, and pushed intellectual culture to the margins. They were more interested in building forts, navies, and castles. This decline ended only when Mohammed el Kebir, bey of Oran, significantly invested in renovating and rebuilding several new educational facilities in the region.

Architecture
Architecture in Algiers during this period showed a convergence of multiple influences and innovations by local architects. Mosques began to be built with domes under the Ottoman influence, but minarets generally still had square shafts in the local tradition, not the round or octagonal shafts seen in other Ottoman provinces, where pencil-shaped minarets were symbols of Ottoman sovereignty. The oldest surviving mosque in Algiers was commissioned by Ali Bitchin in 1622. The New Mosque (Djamaa el-Djedid), built in 1660–1661, became one of the most important Hanafi mosques in Algiers. Architecturally one of the most significant preserved 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 said in 1795 by : "The money spent on it, the types of marble and alabaster brought to it, and the rent and property endowed for it, was so much that no one could allow himself to spend except those whom God grants success." Originally similar in design to the Ali Bitchin Mosque, its appearance was radically changed under later French colonial rule. The arrival of the Ottomans in the early 16th century prompted a radical change in artistic taste, when architectural ceramic tiles replaced the ones decorated with stars and polygons in geometric patterns known as zellij which was used in construction in medieval Maghreb. Square, repetitive and decorative ceramic tiles were diverse and widespread in Algiers and Constantine, with simpler examples in Tlemcen. Archaeology professor Dr. Abdulaziz Al-Araj indicates:

"The tiles and panels that adorned the buildings of Algeria in the Turkish era were characterized by various decorative styles based on the known main motifs in Islamic art, such as epigraphic, geometric, and floral motifs."

In addition to other types of decorations, including drawings of sailboats, rural and seascapes, and drawings of living creatures, the tiles came in three types: Turkish, Tunisian, and European, from Italy, Spain and the Netherlands. These decorated interior walls and floors, forming bands, patterns and frames around doors, windows, and entrances. They were also used on door jambs, window frames and balusters.

Algiers was protected by a wall about 3.1 km long with five gates. Seafront fortifications were supplemented by forts outside the city, including the "star fort", built above the qasba in 1568, defending the landward approaches to the city, the 'twenty-four hour fort', and the Eulj Ali burj, covering the Bab al-Oued beach, built in 1569. Facing south was the "Emperor fort" or Sultan Kalassi, built between 1545 and 1580. A citadel, the qasba, 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.

Djenina Palace ('Little Garden'), also called the Pasha's palace, was begun in 1552 by Salah Rais 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 qasba. The only building from the Dar al-Sultan complex that remains ttoday, the Dar 'Aziza Bint al-Bey, is believed to have been built in the 16th century.

Crafts
Three centuries of Ottoman influence in Algeria left many cultural elements of Turkish origin or influence, wrote Lucien Golvin.


 * Brassware imported by janissaries likely inspired many of the copper lanterns, trays, and ewers made in Algiers, Constantine and Tlemcen. Ottoman decorative elements like tulips and carnations appeared on both chiseled and incised brass.
 * Ornate bronze door knockers were manufactured in Tlemcen until about 1930. Algiers and Constantine produced simpler examples.
 * 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 in rug production in the Guergour region and by the Nemencha and Harakta tribes of patterns with large central lozenge-shaped medallions with arched lobes in a mihrab shape bordered by bands of floral elements. Those produced at the Qal'a of the Banu Rashid displayed multiple medallions in a more Andalusi style, and in the Amour mountains the 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, vests (sédria) 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 a ma'allema (teacher) on a horizontal loom (gargaf). Embroidery from Annaba and Djidjilli was multicolored, with flat dots.
 * Gold- and silversmiths produced jewellery that included coronet-like khit errouh and assabah, worn across the forehead, especially by brides, as well as earrings, bracelets, anklets, necklaces and pins.

Music
Constant arrivals from Anatolia and Al-Andalus brought a mix of Ottoman military music with Sufi bektashi origins, called "mehter", played by janissary bands in a strongly accented style. Andalusian music brought by moriscos developed three styles; Tlemcenian gharnati, Constantine's ma'luf and sana' 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" (Our ship captured a prize) based on 16th century Algerian Arabic poetry by Imad Al-Din Doukkali.

Legacy
Algiers was viewed by Europeans as the center of pirate activity and political anarchy, a fearsome enemy that captivated European imaginations. 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.'" Contemporary British historian James McDougall calls this claim a "colonial myth". He points out that after the 17th century, termed by Algerian historian Lamnouar Merouche the "century of privateering", the corso became rhetorical, its revenues marginal, and like Malta, it was a symbol of Algiers' attachment to its origins as a corsair state. Tribute payments to guarantee peace, trade, customs, taxation and increased agriculture production formed the main revenues 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 "cutthroats and thieves", and the French "civilizing mission", although carried out by brutal means, did offer much to the Algerian people. However, Algerian historian Nacereddin Saidouni argues that although Algeria was not a nation in the modern sense, it was nevertheless a state with its own specificity and a local political entity with its own policy that helped deepen the sense of community among large segments of the Algerian population in the countryside and cities. Algerian historian Yahia Boaziz added that the Ottomans repelled European attacks and convinced the people of the central Maghreb 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." While Saidouni affirms that Algeria took a similar path as the rest of North African states that gradually imposed their sovereignty, as it was no different from Muhammad Ali's Egypt, Husainid dynasty's Tunisia and Alawi's Morocco. Yet, Ruedy notes, 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.