Ottoman Tunisia


Ottoman Tunis refers to the episode of the Turkish presence in Ifriqiya during the course of three centuries from the 16th century until the 18th century, when Tunis was officially integrated into the Ottoman Empire as the Eyalet of Tunis. Eventually including all of the Maghrib except Morocco, the Ottoman Empire began with the takeover of Algiers in 1516 by the Ottoman Turkish corsair and beylerbey Oruç Reis. The first Ottoman conquest of Tunis took place in 1534 under the command of Barbarossa Hayreddin Pasha, the younger brother of Oruç Reis, who was the Kapudan Pasha of the Ottoman Fleet during the reign of Suleiman the Magnificent. However, it wasn't until the final Ottoman reconquest of Tunis from Spain in 1574 under Kapudan Pasha Uluç Ali Reis that the Turks permanently acquired the former Hafsid Tunisia, retaining it until the French occupation of Tunisia in 1881.
Initially under Turkish rule from Algiers, soon the Ottoman Porte appointed directly for Tunis a governor called the Pasha supported by janissary forces. Before long, however, Tunisia became in effect an autonomous province, under the local Bey. This evolution of status was from time to time challenged without success by Algiers. During this era the governing councils controlling Tunisia remained largely composed of a foreign elite who continued to conduct state business in the Ottoman Turkish language.
Attacks on European shipping were made by Barbary pirates, primarily from Algiers, but also from Tunis and Tripoli, yet after a long period of declining raids, the growing power of the European states finally forced its termination after the Barbary Wars. Under the Ottoman Empire, the boundaries of Tunisia contracted; it lost territory to the west and to the east. In the 19th century, the rulers of Tunisia became aware of the ongoing efforts at political and social reform in the Ottoman capital. The Bey of Tunis then, by his own lights but informed by the Turkish example, attempted to effect a modernizing reform of institutions and the economy. Tunisian international debt grew unmanageable. This was the reason or pretext for French forces to establish a Protectorate in 1881.
A remnant of the centuries of Turkish rule is the presence of a population of Turkish origin, historically the male descendants were referred to as the Kouloughlis.

Mediterranean rivalry

In the 16th century, control of the western Mediterranean was contested between Spaniard and Turk. Both were confident due to recent triumphs and consequent expansion. In 1492, Spain had completed her centuries-long reconquista of the Iberian peninsula, which was followed by the first Spanish settlements in America. Spain then formulated an African policy: a series of presidios in port cities along the African coast. For their part, the Ottoman Turks had fulfilled their long-term ambition of capturing Constantinople in 1453, then successfully invaded further into the Balkans, and later conquered Syria and Egypt. Then Turkish corsairs became active from bases in the Maghrib.
Spain captured and occupied several ports in North Africa, including Mers-el-Kebir, Oran, Tripoli, and Bougie ; Spain also established treaty relations with a half dozen others. Among these agreements were ones with Algiers, which included Spanish occupation of the off-shore island Peñón de Argel, with Tlemcen, a city about 40 km. inland, and with Tunis, whose Spanish alliance lasted on-and-off for decades. Near Tunis, the port of Goletta was later occupied by Spanish forces who built there a large and strong presidio; they also constructed an aqueduct to Tunis for use by the kasbah.
, the elder Barbarossa
The Hafsid dynasty had since 1227 ruled Tunisia, enjoying prestige when it was the leading state of the Maghrib, or barely surviving in ill-favored times. Extensive trade with European merchants continued over some centuries, an activity which led to state treaties. Yet the Hafsids also harbored corsairs who raided merchant shipping. During the 15th century the Hafsids employed as bodyguards a Christian force of hundreds, nearly all Catalans. In the 16th century the Hafsid rule grew weak, limited often to Tunis; the last three Hafsid sultans al-Hasan, his son Ahmad, and his brother Muhammad made inconsistent treaties with Spain.
Yet the cross-cultural Hafsid alliance with Spain was not as unusual as it might seem, given the many Muslim-Christian treaties—despite recurrent hostilities. Indeed, during the early 16th century, France allied with the Ottomans against the Spanish King Carlos. As an indirect result of Spain's Africa policy, a few Muslim rulers encouraged Turkish forces to enter the region to counter the Spanish presence. Yet the Hafsid rulers of Tunis came to see the Turks and their corsair allies as a greater threat and entered a Spanish alliance, as also did the Sa'dids of Morocco. Nonetheless many Maghriban Muslims strongly preferred Islamic rule, and the Hafsid's decades-long Spanish alliance was not generally popular, indeed anathema to some. On the other hand, the Saadi dynasty sultans of Morocco successfully played off Iberian against Turk, thus managing to remain both Muslim ruled and independent of the Ottoman grasp.
from 1299 to 1683, the year of their second Siege of Vienna
In this naval struggle, the Ottoman Empire supported many corsairs, who raided European commercial shipping in the Mediterranean. The corsairs later would make Algiers their principal base. The "architects of Ottoman rule in the Maghrib" were Aruj and his younger brother Khizr "Khayr al-Din" . Both were called Barbarossa. The Muslim brothers hailed from obscure origins in the Greek island of Medelli or Mytilene .
After acquiring fighting experience in the eastern Mediterranean, the two brothers arrived in Tunis as corsair leaders. By 1504 they had entered into a privateer agreement with the Hafsid sultan Mohammad b. al-Hasan. By it the 'prizes' were to be shared. The brothers operated from Goletta ; they ran similar operations from Djerba in the south, where Aruj was governor. During these years in Spain, those who remained non-Christian were required to leave, including Muslims; at times Aruj employed his ships to transport a great many Moorish Andalucians to North Africa, especially Tunisia. For these efforts Aruj won praise and many Muslim recruits. Twice Aruj joined the Hafsids in unsuccessful assaults on Bougie, held by Spain. Then the brothers set up an independent base in Djidjelli east of Bougie, which attracted Hafsid hostility.
In 1516 Aruj and his brother Khayr al-Din, accompanied by Turkish soldiers, moved further east to Algiers, where he managed to wrestle control away from the shaykh of the Tha'aliba tribe, who had treatied with Spain. By intra-city political cunning, in which the tribal chief and later 22 notables were killed, control of Algiers passed to the Barbarossa brothers. The Turkish brothers were already Ottoman allies. Yet in 1518 when Aruj led an attack against Tlemcen, then held by a Spanish ally, Aruj was killed by Muslim tribal forces and the Spanish.
His younger brother Khayr al-Din inherited control of Algiers, but left that city and for some years was based to its east. After returning to Algiers, in 1529 he captured from Spain the offshore island Peñón de Argel whose guns had controlled the port; by constructing a causeway joining these islands he created an excellent harbor for the city. Khayr al-Din continued to direct large-scale raids on Christian shipping and against the coast lands of Mediterranean Europe, seizing much wealth and taking many captives. He won several naval battles and became a celebrity. In 1533 Khayr al-Din was called to Constantinople where the Ottoman sultan made him Pasha and the admiral over the Turkish navy; he acquired control over many more ships and soldiers. In 1534 Khayr al-Din "taking advantage of a revolt against the Hafsid al-Hasan" invaded by sea and captured the city of Tunis from Spain's allies.
, with Kabyle troops
Yet the following year the Emperor Charles V organized a fleet under Andrea Doria of Genoa, composed predominantly of Italians, Germans, and Spaniards, which proceeded to recapture Tunis in 1535, following which the Hafsid sultan Mawlay Hasan was reestablished. Yet Khayr al-Din escaped. Thereafter, as supreme commander of naval forces for the Ottoman Empire, Khayr al-Din was largely preoccupied with affairs outside the Maghrib.
A few decades passed until in 1556 another Turkish corsair Dragut, ruling in Tripoli, attacked Tunisia from the east, entering Kairouan in 1558. Then in 1569 Uluj Ali Pasha, a renegade corsair, now the successor to Khayr al-Din as the Beylerbey of Algiers, advanced with Turkish forces from the west, and managed to seize the Spanish presidio Goletta and the Hafsid capital, Tunis. After the key naval victory of the Christian armada at Lepanto in 1571, Don Juan de Austria in 1573 retook Tunis for Spain, restoring Hafsid rule. Yet Uluj Ali returned in 1574 with a large fleet and army, and captured Tunis with finality. To the Turkish sultan he then sent by ship, imprisoned, the last ruler of the Hafsid dynasty.
The Spanish-Ottoman truce of 1581 quieted the Mediterranean rivalry between these two world powers. Spain kept a few of its Maghriban presidios and ports. Yet both Spanish and Ottoman Empires had become preoccupied elsewhere. The Ottomans would claim suzerainty over Tunisia for the next three centuries; however, its effective political control in the Maghrib would prove to be of short duration.

Ottomans in the West

Absent the entry of the Turks into the western Mediterranean, the political situation favored the Christian north. In overall strength, the various European powers led by Spain continued to increase their lead. Among the local Maghriban states in comparison, business was in decline and their governments weak and divided. The long-term future seemed to present the possibility, or probability, of an eventual 'reconquest' of North Africa from the north. Accordingly, the intervention by another rising foreign power, co-religionists from the east, namely the well-armed Ottoman Turks, appeared crucial. It tipped the scales in the Maghrib, allowing for several centuries of continued rule by the older Muslim institutions, as redone per Turkish notions. Furthermore, the successful but questionable tactic of mounting raids on European commercial shipping by the corsairs of Barbary fit well enough into the Mediterranean strategy pursued by the Ottoman Porte at Constantinople.
"Turkey was frequently combated by native North African rulers, and never gained any hold over Morocco. But the Turks were none the less a powerful ally for Barbary, diverting Christian energies into eastern Europe, threatening Mediterranean communications, and absorbing those forces which might otherwise have turned their attention to reconquest in Africa."

in Ottoman times
So for the first time the Ottomans entered into the Maghrib, eventually establishing their governing authority, at least indirectly, along most of the southern coast of the Mediterranean. During the 16th and subsequent centuries their empire was widely recognized as the leading Muslim state in the world: Islam's primary focus. The Ottoman Empire was "the leader of all Islam for nearly half a millennium." The Turkish sultan became the caliph.
This Ottoman contact enriched Tunisia by its distinctive Islamic culture and institutions, which differed markedly from the familiar Arab world. For more than half a millennium Islamic doctrines had filtered through Turkish experience, whose ethnic origin lay in Central Asia, resulting in unique developments, and new perspectives. For example, Turks wrote their own gazi sagas of frontier warfare, no doubt following Islamic traditions of early Arab conquests, yet informed by legends of their own derived from life on the steppes of Central Asia. Due to the exigencies of rule, and its large geographic jurisdiction, the Ottoman state took the lead in Muslim legal developments for some centuries. Sources of imperial law included not only Islamic fiqh, and inherited Roman-Byzantine codes, but also "the traditions of the great Turkish and Mongol empires of Central Asia". The Turkish jurist Ebu us-Suud Efendi was credited with the harmonization for use in Ottoman courts of the qanun and the şeriat.
Ottoman popular literature and much of the learning of its elites was expressed in the Turkish language. Turkish became the idiom for state business in Tunisia and its unique flavors percolated throughout Tunisian society. After Arabic and Persian, it is the third language of Islam and for centuries has "played a very important role in the intellectual life" of Muslim culture. In addition, the Turks brought their popular customs, such as their music, clothing, and the coffee house.
The new energy of Turkish rule was welcome in Tunis and other cities, and the regime's stability appreciated by the clerical ulama. Although the Ottomans preferred the Hanifi school of law, some Tunisian Maliki jurists were admitted into administrative and judicial positions. Yet the rule remained one of a foreign elite. In the countryside, efficient Turkish troops managed to control the tribes without compromising alliances, but their rule was unpopular. "Ottomans' military prowess enable them to curb the tribes rather than placate them. An image of Turkish domination and Tunisian subordination emerged everywhere." The rural economy was never brought under effective regulation by the central authority. For revenues the government continued to rely primarily on corsair raids against shipping in the Mediterranean, an activity then more 'profitable' than trade. With a Spanish-Ottoman accord in 1581 Spain's attention turned away and corsair activity increased. Yet peaceful trade and commerce suffered.
Introduction into Tunisia of a Turkish-speaking ruling caste, whose institutions dominated governance for centuries, indirectly affected the lingering divide between Berber and Arabic in the settled areas. This bipolarity of linguistic culture had been reactivated by the 11th-century invasion of the rebellious Arabic-speaking Banu Hilal. Subsequently, Arabic had gained the ascendancy, and use of Berber had been thereafter gradually eroding. Then this assertive presence of a Turkish-speaking elite seemed to hasten the submergence of Berber speech in Tunisia.

Pasha role in Tunis

After Tunisia's fall to the Ottoman Empire, a Pasha was eventually appointed by the Porte. "Pasha" is Ottoman imperial nomenclature indicating a high office, a holder of civil and/or military authority, e.g., the governor over a province. During its first few years under the Ottomans, however, Tunisia was ruled from the city of Algiers by a corsair leader who held the Ottoman title beylerbey. Its early capture gave Algiers some claim to primacy within the expanding Turkish Empire. It was only under the Ottomans that Algiers became a favored city. Before, Algiers was not particularly significant; the middle Maghriban coast for the most part had long lain in the shadows of Tunis to its east and of Morocco or Tlemcen to its west.
, 1574
During early Ottoman rule, Tunisia lost control over Constantine. The area was historically within Hafsid domains, but fell to attacks led by the beylerbey Khayr al-Din of Algiers. Later Tunisia also lost Tripoli, ruled by another Turkish corsair, the renegade Dragut or Turgut Reis.
In 1518 the younger Barbarossa Khayr al-Din became the first Ottoman beylerbey in Algiers. His rule was autocratic, without the moderating advice of a council. As Beylerbay he captured Tunis in 1534, holding it only a year. In 1536 Khayr al-Din left the Maghrib, promoted to command the Ottoman fleets. Four beylerbeys in succession then ruled in Algiers and over areas of North Africa fallen to Ottoman control. The renegade corsair Uluj Ali was appointed Pasha of Algiers and its last Beylerbey in 1568; the Porte instructed him to capture Tunis. He was perhaps "with Khayr al-Din the greatest figure in Turkish rule" of the Maghrib. In 1569 Uluj Ali took Tunis, holding it four years, yet in 1574 he again took possession of the city. Tunis thereafter remained under the Beylerbey in Algiers, Uluj Ali, until his death in 1587. The office was then abolished.
Perhaps due in part to these few brief periods of Algerian rule over Tunis in the early Ottoman era, later Turkish rulers in Algiers more than once tried to exercise control over Tunisian affairs by force, e.g., during intra-dynasty conflicts. Yet eventually such interference by Algiers was each time checked.
The beylerbey had "exercised the authority of suzerain in the name of the Ottoman sultan over . was the supreme Ottoman authority in the western Mediterranean, and responsible for conducting the war against the Christian enemies of the empire...." When Uluj Ali died, the Turkish sultan discontinued the office, in effect normalizing the administration of the Maghriban provinces in acknowledgement of an end to the long struggle with Spain. In its place, for each province, the office of pasha was established to oversee provincial government.
Thus in 1587 a Pasha became Ottoman governor of Tunisia. Under the Pasha served a Bey, among whose duties was the collection of state revenue. From 1574 to 1591 a council, composed of senior Turkish military and local notables, advised the pasha. The language used remained Turkish. With permanent Ottoman rule the government of Tunis acquired some stability. The prior period had been made insecure and uncertain by the fortunes of war.
Yet the new Ottoman Pasha's grip on power in Tunisia was if anything of short duration. Four years later, in 1591 a revolt within the ranks of the occupying Turkish forces thrust forward a new military commander, the Dey, who effectively took the Pasha's place and became the ruling authority in Tunis. The Pasha remained as a lesser figure, who nonetheless continued to be appointed from time to time by the Ottoman Porte. Within a few decades, however, the Bey of Tunis added to his office the title of Pasha; soon thereafter, the Bey's growing power began to eclipse that of the Dey. Eventually the Bey of Tunis became the sole ruling authority. The Beys of Tunis always kept well apart from any Ottoman attempts to compromise their political grip on power. Yet the Beys as Muslim rulers were also dignified by the honor and prestige associated with the title of Pasha, with its direct connection to the Ottoman Caliph, whose religious significance included being the 'Commander of the Faithful'.

Janissary Deys

The Ottomans first garrisoned Tunis with 4,000 janissaries taken from their occupying forces in Algiers; the troops were primarily Turkish, recruited from Anatolia. Janissary corps were under the immediate command of their Agha. The junior officers were called deys ; each dey commanded about 100 soldiers. The Ottoman Porte did not thereafter maintain the ranks of the janissaries in Tunis, but its appointed Pasha for Tunisia himself began to recruit them from different regions.
battling against the defending Knights of St. John during the second Siege of Rhodes in 1522
The janissaries were an elite institution peculiar to the Ottoman state, though deriving from an earlier practice. Christian youth called devshirme , often from Greece and the Balkans, were impressed into military training and compelled to convert to Islam; when mature they provided an elite corps of soldiery. Kept apart in their barracks and forbidden marriage, they were under a strict code of toilet and dress, and regimented by rules of the Hurufi sect. Begun in the 15th century as a type of slavery, the janissaries later came to enjoy privileges and might rise to high positions. A well-known symbol of their collective force was the huge kazan , beside which they ate and talked business. Eventually Muslims became members; the janissaries gained the right to marry and evolved into a powerful caste. They were then liable to riot and loot if not appeased, and "not less than six Sultans were either dethroned or murdered through their agency." At first a small elite of 10,000 by the 19th century before the institution was terminated "the number on the payroll had reached... over 130,000."
In the Maghrib under Ottoman control, however, the janissaries were originally Turkish or Turkish-speaking. There existed some rivalry between the janissaires and the corsairs, who were composed in large part of Christian renegades, and as against other Turks. Also the janissaries viewed with suspicion, as potential enemy combatants, the local tribal forces and the militias of the Maghrib. Called collectively the ojaq , the janissary corps maintained a high degree of unity and élan.
"They possessed a high sense of group solidarity and egalitarian spirit in the ranks, and elected their commander-in-chief, the agha, and a diwan which protected their group interests. Being Turkish, they enjoyed a privileged position in the state: they were not subject to the regular system of justice in the regency, and were entitled to rations of bread, meat, and oil, to a regular salary, and to a proportion of the yields of piracy."

, from a drawing by Gentile Bellini of Venice
In Tunisia until 1591, the corps of janissaries was considered to be under the control of the local Ottoman Pasha. In 1591 janissary junior officers overthrew their senior officers; they then forced the Pasha to acknowledge the authority of one of their own men. This new leader was called the Dey, elected by his fellow deys. The Dey took charge of law and order in the capital and of military affairs, thus becoming "the virtual ruler of the country". The change defied the Ottoman Empire, although from the Tunisian perspective political power still remained under the control of foreigners. The existing state diwan was dismissed, but to placate local opinion some Tunisian Maliki jurists were appointed to some key positions. The janissary Dey enjoyed wide discretion, being quite free in the exercise his authority, yet his reach was at first limited to Tunis and other cities.
Two very effective Deys were 'Uthman Dey and his son-in-law Yusuf Dey. Able administrators, they displayed tact, enhancing the dignity of the office. Neither being fond of luxury, treasury funds were made available for public projects and new construction. Rebellious tribes were subdued. A long period of chronic social turbulence in Tunisia was brought to a close. The resulting peace and order allowed for some measure of prosperity. The Dey's ruling authority was both supported by, and relied upon, the Qaptan of the corsair fleet and the Bey who collected taxes.
Yet under Yusuf Dey, various interest groups emerged which maneuvered to outflank his ruling strategies. Many such were Tunisian, e.g., the local military, the urban notables including the disbanded diwan, and most rural tribes; also included at least to some extent was the distant sultan in Constantinople. During the 1620s and 1630s the local Turkish Bey managed to enlist these social forces, thus augmenting his authority and coming to rival the Dey, then overtaking him. That the political reign of the Dey and his janissaries had slowly evaporated was clearly demonstrated when in an attempt to regain power their uprising of 1673 failed.

Corsair enterprise

Piracy may be called "an ancient if not always honorable activity" which has been practiced at different times and locations by a wide variety of peoples. A :wikt:corsair may be distinguished from a pirate in that the former operates under explicit government authority, while the later carries no papers. The Mediterranean region during the late Middle Ages and renaissance became the scene of wide-scale piracy practiced both by Christians and by Muslims.
The first "great age of the Barbary corsairs" occurred in the 16th century, between 1538 and 1571. Ottoman sea power in the Mediterranean was supreme during these decades, following their naval victory at the Preveza. Ottoman supremacy, however, was effectively broken at Lepanto, although Ottoman sea power remained formidable. In the early 17th century corsair activity again peaked. Thereafter Algiers began to rely more on 'tribute' from European nations in exchange for safe passage, rather than attacking merchant ships one by one. Ottoman Empire treaties with European states added a layer of conflicting diplomacy. Lastly, during the wars following the French Revolution, Barbary corsairs activity briefly spiked, before ending abruptly.
taking a galley
In 16th-century Algiers under the new Ottoman regime, the customs and practices of the pre-existing Barbary corsairs were transformed and made into impressive institutions. The activity became highly developed, with modes of recruitment, corps hierarchies, peer review, private and public financing, trades and materials support, coordinated operations, and resale and ransom markets. The policies developed in Algiers provided an exemplary model of corsair business, a model latter followed by Tunis and by Tripoli, and independently by Morocco.
Crews came from three sources: Christian renegades, foreign Moslems, and a few native maghribans. Seldom did a native attain high rank, the exception being Reis Hamida a Kabyle Berber during the last years of the corsair age. Captains were selected by the ship's owners, but from a list made by a Diwan of the Riesi, an authoritative council composed of all active corsair captains. Also regulated was location of residence. "Captains, crews, and suppliers all lived in the western quarter of Algiers, along the harbor and docks."
Private capital generally supplied the funds for corsair activity. Investors essentially bought shares in a particular corsair business enterprise. Such investors came from all levels of society, e.g., merchants, officials, janissaries, shopkeepers, and artisans. The financing made money available for the capital and expenses of ship and crew, i.e., naval stores and supplies, timbers and canvas, munitions.
"Because of the potential profits to be made from corsair prizes, the underwriting of expeditions was an attractive proposition. Shareholding was organized in the same manner as that of a modern stock company, with the return to individuals dependent on their investment. This type of private investment reached its peak in the seventeenth century, the 'golden age'."

After the corsair "golden age", the state of Algiers, mainly under the control of its Turkish janissaries, came to own many of the corsair vessels and to finance many of their expeditions. Strict rules governed the division of the prizes captured at sea. First came Algiers as the state representative of Allah; next came the port authorities, the custom brokers, and those who kept the sanctuaries; then came that portion due the ship owners, and the captain and crew. The merchant cargo seized was sold "at auction or more commonly to European commercial representatives resident in Algiers, through whom it might even reach the port of its original destination."
Ransom or sale of captured prisoners was the main source of private wealth in Algiers. Payment for captives was financed and negotiated by religious societies. The conditions of the captivity varied, most being worked as slave labor. Yet often the Muslim masters granted these Christians some religious privileges. During the early 17th century in Algiers more than 20,000 Christian prisoners were being held, coming from more than a dozen countries. "To the people of Barbary captives were a source of greater profit that looted merchandise." Yet in Tunis corsair activity never became paramount as it long remained in Algiers.

Muradid Beys

The Bey in Tunisia was leading officer who "supervised the internal administration and the collection of taxes." In particular, the Bey's duties included control and collection of taxes in the tribal rural areas. Twice a year, armed expeditions patrolled the countryside, showing the arm of the central authority. For this purpose the Bey had organized, as an auxiliary force, rural cavalry, mostly Arab, recruited from what came to be called "government" tribes.
Ramdan Bey had sponsored a Corsican named Murad Curso since his youth. After Ramdan's death in 1613, Murad then followed his benefactor into the office of Bey, which he exercised effectively. Eventually he was also named Pasha, by then a ceremonial post; yet his position as Bey remained inferior to the Dey. His son Hamuda Bey, with the support of the local notables of Tunis, acquired both titles, that of Pasha and that of Bey. By virtue of his title as Pasha, the Bey came to enjoy the social prestige of connection with the Sultan-Caliph in Constantinople. In 1640, at the death of the Dey, Hamuda Bey maneuvered to establish his control over appointments to that office. As a consequence the Bey then became supreme ruler in Tunisia.
Under Murad II Bey, son of Hamuda, the Diwan again functioned as a council of notables. Yet in 1673 the janissary deys, seeing their power ebbing, rose in revolt. During the consequent fighting, the janissaries and urban forces commanded by the deys fought against the Muradid Beys supported by largely rural forces under tribal shaykhs, and with popular support from city notables. As the Beys secured victory, so did the rural Bedouin leaders and the Tunisian notables, who also emerged triumphant. The Arabic language returned to local official use. Yet the Muradids continued to use Turkish in the central government, accentuating their elite status and Ottoman connection.
At Murad II Bey's death, internal discord within the Muradid family led to armed struggle, known as the Revolutions of Tunis or the Muradid War of Succession. The Turkish rulers of Algeria later intervened on behalf of one side in this struggle born of domestic conflict; these Algerian forces remained after the fighting slowed, which proved unpopular. Tunisia's unfortunate condition of civil discord and Algerian interference persisted. The last Muradid Bey was assassinated in 1702 by Ibrahim Sharif, who then ruled for several years with Algerian backing. Hence, the dynasty of the Muradid Beys may be dated from 1640 to 1702.
A gradual economic shift occurred during the Muradid era, as corsair raiding decreased due to pressure from Europe, and commercial trading based on agricultural products increased due to an integration of the rural population into regional networks. Mediterranean trade, however, continued to be carried by European shipping companies. The Beys, in order to derive the maximum advantage from the export trade, instituted government monopolies which mediated between the local producers and foreign merchants. As a result, the rulers and their business partners took a disproportionate share of Tunisia's trading profits. This precluded the development of local business interests, whether rural landowners or a wealthy merchant strata. The social divide persisted, with the important families in Tunisia identified as a "Turkish" ruling caste.

Husaynid Beys

As holders of the office of Bey the Husaynid Dynasty effectively ruled Tunisia as sovereigns from 1705 to 1881; thereafter they continued to merely reign until 1957. In Ottoman theory perhaps until 1881 the Bey of Tunis remained a vassal of the Ottoman Empire but for centuries the Ottomans were not able to depend on, or exact, the obedience of the Tunisian Bey. In 1881 the French created their protectorate which lasted until 1956. During this period the beylical institution was retained; the Husaynid Bey served as titular head of state but it was the French who actually ruled the country. After achieving its full independence Tunisia declared itself a republic in 1957; the beylical office was terminated and the Husaynid dynasty came to an end.
The dynastic founder Husayn ibn Ali, an Ottoman cavalry officer of Cretan origin, managed to acquire the sovereign power in 1705. His military units were included in those Tunisian forces that fought and defeated the then Algerian invasion. The Turkish janissary then selected their own Dey as the new ruler. Husayn ibn Ali, however, opposed the Dey and sought the backing of Tunisian khassa, the ulama and the religious, as well as local tribes. Thus, though also a Turkish-speaking foreigner, he worked to obtain native loyalties against the Turkish soldiery and eventually prevailed. Accordingly, as ruler he sought to be perceived as a popular Muslim interested in local issues and prosperity. He appointed as qadi a Tunisian Maliki jurist, instead of an Hanafi preferred by the Ottomans. He also restricted the legal prerogatives of the janissary and the Dey. Under Husayn b. Ali as Bey of Tunis support was provided to agriculture, especially planting olive orchards. Public works were undertaken, e.g., mosques and madrassa. His popularity was demonstrated in 1715 when the kapudan-pasha of the Ottoman fleet sailed to Tunis with a new governor to replace him; instead Husayn Bey summoned council, composed of local civil and military leaders, who backed him against the Ottoman Empire, which then acquiesced.
In 1735 a succession dispute erupted between his nephew Ali and his son Muhammad who challenged his cousin. A divisive civil war was fought; it ended in 1740 with Ali's uncertain victory. This result was reversed in 1756 after ten more years of fighting, but not without further meddling by Algeria.
Early Husaynid policy required a careful balance among several divergent parties: the distant Ottomans, the Turkish-speaking elite in Tunisia, and local Tunisians. Entanglement with the Ottoman Empire was avoided due to its potential ability to absorb the Bey's prerogatives; yet religious ties to the Ottoman Caliph were fostered, which increased the prestige of the Beys and helped in winning approval of the local ulama and deference from the notables. Janissaries were still recruited, but increasing reliance was placed on tribal forces. Turkish was spoken at the apex, but use of Arabic increased in government use. Kouloughlis and native Tunisians notables were given increased admittance into higher positions and deliberations. The Husaynid Beys, however, did not themselves intermarry with Tunisians; instead they often turned to the institution of mamluks for marriage partners. Mamluks also served in elite positions. The dynasty never ceased to identify as Ottoman, and thereby privileged. Nonetheless, the local ulama were courted, with funding for religious education and the clerics. Local jurists entered government service. Marabouts of the rural faithful were mollified. Tribal shaykhs were recognized and invited to conferences. Especially favored at the top were a handful of prominent families, Turkish-speaking, who were given business and land opportunities, as well as important posts in the government, depending on their loyalty.
The French Revolution and reactions to it negatively affected European economic activity leading to shortages which provided business opportunities for Tunisia, i.e., regarding goods in high demand but short in supply, the result might be handsome profits. The capable and well-regarded Hammouda Pasha was Bey of Tunis during this period of prosperity; he also turned back an Algerian invasion in 1807, and quelled a janissary revolt in 1811.
After the Congress of Vienna in 1815, Britain and France secured the Bey's agreement to cease sponsoring or permitting corsair raids, which had resumed during the Napoleonic conflict. After a brief resumption of raids, it stopped. In the 1820s economic activity in Tunisia took a steep downturn. The Tunisian government was particularly affected due to its monopoly positions regarding many exports. Credit was obtained to weather the deficits, but eventually the debt would grow to unmanageable levels. Tunisia had sought to bring up to date its commerce and trade. Yet different foreign business interests began to increasingly exercised control over domestic markets; imports of European manufactures often changed consumer pricing which could impact harshly on the livelihood of Tunisian artisans, whose goods did not fare well in the new environment. Foreign trade proved to be a Trojan Horse.
Under the French Protectorate the Husaynid Beys continued in a largely ceremonial rôle. Following independence a republic was declared in 1957, ending the Husaynid dynasty.

Age of modern reform

Islamic Context

The sense of urgency for such reform stemmed from the intrusion of modernism. The cultural stream of interest and invention coming from the Christian Europeans caused many Muslims to search for a proper and adequate response. Merely to learn the foreign ways risked becoming alienated from one's own people and faith, yet modern science and technology, and perhaps government and social culture also, were becoming an ever-increasing challenge. The desire to reform appeared across the Muslim world, among the Ottomans and among the more remote Iranians and Mughals, as well as the Arabs. If for no other reason than the performance of European armies and fleets, these modern ways were necessary to master. Devout Muslims realized that a proper place must be located in their tradition for this wealth of the new.
Several early reformers presented different remedies, which when repeated were often expressed as general ideologies, e.g., the pan-Islamic, the pan-Arabic, the pan-Turkic, the nationalist. Some Islamic reforms were sourced wholly within Islam and actually pre-dated the modern, making no reference to it, e.g., wahabism. Yet reformed or not, Muslims were adopting the European inventions one piece at a time, day after day, year after year. If Muslim societies continued to so evolve under the influence of the modern, yet without a context of understanding, the coherence of tradition might come apart. Christians, too, of Europe and of the Americas, were faced with similar dilemmas, had been for centuries; their various solutions were complex and not always satisfactory, nor for everyone. Yet for Muslims the problem was different. Christians experienced modernity as generated mainly by their own creativity, which gave its possessors an initial edge over others. Muslims noticed in them a widespread increase in non-belief.

Ottoman ''Tanzimat''

During the 18th and 19th centuries, Ottoman rulers pursued a broad range of difficult reforms, e.g., in education, in justice, in government, and not least in the military. The second major wave of reform, called the Tanzimat , began in the early 19th century and lasted into the 20th. In 1839 the well-known Hatt-i Sherif was ceremoniously read from the Gülhane to an assembled elite; it outlined anticipated changes in several substantive policies: a) taxes, their fair assessment and collection the military, the conscription of soldiery to be equitable and proportionately spread over the provinces; c) civil liberties, citizens to be secure in their property, criminal procedure to be public, and the different religions treated equally; and, d) the new Council of Judicial Ordinances designated as the consultative and legislative body, and charged to carry out this work. This articulation of broad principles led to its very gradual and fragmented implementation during the next 40 years. The course of Ottoman reform was erratic, the source of division among elites, and while continuously pursued could prove dangerous to its proponents.

European trade

Starting early in the 19th century, Tunisia under came increasingly under European influence. Under the Husaynid Beys, trade and commerce with the Europeans increased year after year. Permanent residences were established in Tunis by many more foreign merchants, especially Italians. In 1819 at French insistence the Bey agreed to quit with finality corsair raids. Also the Bey agreed with France to terminate his revenue policy whereby government agents dominated foreign trade by monopolizing the export of Tunisian goods; this change in policy opened the country to international commercial firms. In 1830 the Bey reluctantly accepted responsibility to enforce in Tunisia the capitulation treaties negotiated by France, and various other European powers, with the Ottoman Empire over the course of several centuries. Under these treaties, European merchants enjoyed extraterritorial privileges while within Ottoman domains, including the right to have their resident consuls act as the judge in legal cases involving their national's civil obligations. Also in 1830 the French royal army occupied the central coastal lands in neighboring Algeria. At that time, they were inexperienced about and lacked the knowledge of how to develop a colony.

Ahmad Bey

assumed the throne during this complex and evolving situation. Following the examples of the Ottoman Empire under sultan Mahmud II, and of Egypt under Muhammad Ali, he moved to intensify a program to update and upgrade the Tunisian armed forces. A military school was founded and various new industries started to supply an improved army and navy. In a major step, the Bey initiated the recruitment and conscription of individual Tunisians to serve in the army and navy, a step which would work to reduce the customary division between the state and its citizens. Yet the corollary of tax increases for these military innovations were not popular, nor adequate.
Regarding the Ottoman relationship, Ahmad Bey continued the previous beylical policy, in that he would decline or reject political attachment to the Ottoman state in order to remain free of imperial control, yet he welcomed religious ties to the Ottoman Caliphate for the prestige it brought him domestically and to discourage European state interference. Accordingly, Ahmad Bey repeatedly refused to apply in Tunisia the Ottoman Tanzimat legal reforms concerning citizen rights, i.e., those of the Hatt-i Sherif of 1839. Instead, he instituted progressive laws of his own, showing native Tunisian authority in the modernizing project and hence the redundancy of importing any of the Ottoman reforms. The Slave trade was abolished in 1841, slavery in 1846. Yet for many Tunisians these civil law reforms had limited application.
As part of his maneuvering to maintain Tunisia's sovereignty, Ahmad Bey sent 4,000 Tunisian troops against the Russian Empire during the Crimean War. In doing so he allied Tunisia with Turkey, France, and Britain.

Khayr al-Din