# Odjak of Algiers Revolution

The Revolution of the Odjak, also known as the Aghas Revolution or the Revolution of 1659 was an important military revolution that changed the essential bases of the government of the Ottoman Regency of Algiers, as well as its relations with the imperial centre in Istanbul. Taking place during a period of transformation of the Ottoman Empire, and lasting from June to September 1659, it was largely viewed as a result of the loss of the importance that the Regency previously had for Constantinople back in the 16th century; decades of marginalization demonstrated through the appointment of incompetent governors and diverging interests regarding relations with European powers, made both the Barbary corsairs and the janissaries of Algiers less inclined to commit themselves to the Ottoman cause. This culminated in the rise of the janissary Odjak corps as the most prominent faction of the Ottoman Algerian political elite.
At the end of Pasha Ibrahim's reign as the Ottoman governor (1656–1659), a massive uprising arose against him, led by the corsair captains and Odjak soldiers. As for the raïs, they revolted because Pasha Ibrahim had deprived them of the sums of money allocated to them by the Ottoman Empire as compensation for their losses in the Adriatic. And his payment of bribes to the statesmen in Constantinople to keep him in office. For this reason, the corsairs attacked his palace, arrested him, and imprisoned him. The Odjak soldiers were constantly trying to seize opportunities to assume power, and they found in this incident an opportunity for them, so they carried out a sudden coup against the pasha. The janissaries effectively eliminated the authority of the pasha, whose position became only ceremonial, and agreed to assign executive authority to the Diwân of Algiers headed by the commander-in-chief of the Algerian Odjak, Khalil Agha.$^{:207}$

## Background events (1654-1659)

The Corsair Barbarossa brothers Oruç and Hayreddin had placed the Regency under the protection of the Porte, and had requested and obtained the title of pasha. In the early period of the regency, the pashas were chosen from among the most illustrious sailors, because the Algerian fleet often lent powerful assistance to the Ottoman navy in its struggles against the European powers. But after the battle of Lepanto, the weakened Porte, absorbed by the preoccupation of more serious and more neighboring interests, no longer took the same care in the choice of the governors of Algiers. Obscure favorites, or greedy officials who bought their nomination by corrupting the main officers of the "Grand lord", were often invested; As soon as they arrived, they rushed to make their fortune, drawing on all sources of income. The militia, accustomed to obeying illustrious leaders, whom it loved, wasted no time in showing a spirit of independence and revolt towards these unworthy successors of Hayreddin, Hassan-Pasha, Salah reis and Sinan-Pacha. On more than one occasion, the Agha of the militia put himself in opposition to the governor sent by the Porte, and led the Diwan to take resolutions entirely contrary to the orders received from Constantinople. Thus, several pashas were fired, others were killed.

### Economic crisis
#### War with the Alawi dynasty

The Alawite Emirate emerged under the leadership of Sharif ibn Ali and his son Moulay Mohammed amidst the disturbances that plagued the farthest regions of Morocco during the first half of the seventeenth century. The latter set out from Tafilalt in the south, expanding northeastward to the Moulouya river.$^{:385}$ In 1653, his forces crossed this mentioned valley towards Oujda, which was until then under the control of the regency of Algiers. Moulay Mohammed took over Oujda after he launched an attack on the tribes that had refused to submit to his authority. Extending his conquest to the outskirts of Tlemcen, its residents attempted to resist him, but he defeated them and forced them to seek refuge behind the city walls. He then continued his campaign, laden with spoils.$^{:386}$ Moulay Mohammed spent the winter in Oujda, and in the following year, he launched another campaign into the western provinces of the regency. He plundered everything along his path with little opposition until he reached Laghouat.$^{:21}$
Mahram Pasha, the governor of Algiers, led by his advisor, prepared to confront the Alawite prince, but they failed to locate him because he had moved southward, returning to Oujda and then to Sijilmasa. Moulay Mohammed's invasion had sparked serious disturbances in the western provinces, leading to a rebellion in Tlemcen. Several tribes refused to pay taxes either because their properties and livestock had been looted, prompting them to declare their disobedience. Meanwhile, the Turkish garrison managed to suppress the uprising in Tlemcen.$^{:176}$$^{:386–390}$ However, their efforts yielded only minimal tax revenues from the western provinces.

#### Epidemic in Algiers

In 1654, a devastating plague outbreak spread throughout Algiers, lasting for approximately three years. Its impact was catastrophic, claiming the lives of thousands of Christian slaves and about three-quarters of the city's population. This epidemic led to a significant economic slowdown due to the deaths of a considerable number of merchants and craftsmen in the city, or their escape to rural areas to avoid infection. Furthermore, commercial ships that used to visit Algiers no longer returned, and the rais dared not venture out of the harbor.$^{:378}$
To compensate for the declining revenues resulting from the reduced economic activities and the loss on the treasury, Mahram Pasha increased taxes on the remaining activities and inflated the state's income from customs duties, which surged during a similar period due to the rising death toll. However, this equation did not hold for long. Within the second year of the epidemic's appearance, the financial crisis escalated to an unmanageable extent. The problem weighed heavily on the shoulders of Ahmed Pasha, who succeeded Mahram Pasha in July 1655. Due to the worsening financial situation, he ended up in prison after seven months of rule. His successor, Ibrahim Pasha, was not more fortunate, as he was imprisoned in May 1656, just three months after taking office, due to his inability to pay the Odjak salaries.$^{:204}$

#### Maritime setbacks

Neither of these governors could rely solely on piracy and maritime raids to banance their budgets, since these had also diminished during their tenure due to significant losses suffered by the Algerian fleet, such as the events that occurred in the autumn of 1655 during the Cretan War and European anti-piracy efforts. The Dutch admirals, especially Michiel de Ruyter, chased the rais ships, and the latter decided to confront them near the Strait of Gibraltar. The Dutch admiral managed to capture twelve Algerian ships, some of which he commandeered. Furthermore, he pursued others and forced some to seek refuge on the Moroccan coast of the Mediterranean. In the same year, the Algerians lost seven ships in a battle on the Aegean sea against a fleet that included the Venetians.$^{:248}$

## Janissary Odjak uprising

All of these factors led to the creation of a suffocating crisis, more severe than ever before. Ibrahim Pasha exhausted all means to gather funds in devious ways, including extorting the city's wealthy and imposing additional fines on merchants and craftsmen, as well as anyone capable of paying. However, he failed in his efforts. The Odjak grew increasingly angry at him, for their overdue salaries. They didn't give him any respite and, in June 1659, threw him back into prison for the second time, especially since Ali Pasha had recently been appointed by the Ottoman Caliphate.$^{:387}$

### Corsair Revolt

The new governor arrived with a decree instructing the Algerians to prepare and send a naval fleet to the East, with financial compensation for the leaders in return for their contributions to the Cretan War. However, the newly appointed Pasha found himself in a dire situation, as the Odjak were on the brink of revolt, impatiently waiting for their delayed salaries, while the treasury was nearly empty. When he could not find another solution, he reluctantly decided to deduct a portion of the money designated specifically for the Taifa of Raïs (Corsairs).
As a result, the Rais revolted against Ali Pasha, and the situation escalated. On the day of the general Diwan meeting, at the request of the Rais representatives, it was decided to arrest the new Pasha and his followers, who were then sent back to İzmir. The mismanagement of the Pashas and the general causes of the financial crisis in which the state was floundering were discussed. The council members concluded that it was necessary to abolish the financial prerogatives of the Ottoman Pasha, which included paying salaries and managing taxation and public expenses.$^{:387}$ Ibn El Mufti explained the reasons behind stripping the Pashas of the salary payment privilege as follows: "When they were entrusted with this duty, they exploited it to plunder the money sent to the palace from various sources without restraint. During that time, they frequently rotated in power at close intervals, and the residents of Algiers fell victim to their greed. They even occasionally forced scholars and court officials to pay a certain amount."
Here are the terms in which Father Barreau, then French consul in Algiers, reported on this revolution:
   In the month of June (1659), the divan still continued in the good arrangements he had made to maintain correspondence with foreign countries, and particularly with Marseille, having been informed, both of his own subjects and Christian merchants and others, reasons why his port seemed abandoned as well as the country of his domination, and having been represented to him that the too great authority that he allowed to take insensibly from the pashas who come from the Porte of the great lord giving them opportunity to do a lot of extortion and humiliation; this is why he would have resolved, for the good and for the benefit of all, to completely abolish this disproportionate authority that they had imposed on themselves, and, for this purpose, would have forbidden the one who is in charge of the present to meddle in anything.

### Ottoman reaction

As soon as Pasha Ali arrived in İzmir, he submitted a report on what he had encountered and requested permission from its judge regarding informing Istanbul about it. The Grand Vizier Köprülü Mehmed Pasha was angered by the uprising rebellion in Algiers, considering it an act of disobedience to the Ottoman Sultan. Due to his intense anger, he summoned Ali to Istanbul and ordered his execution.$^{:162}$ Meanwhile, the Diwan of Algiers had sent a delegation with gifts to the Sublime Porte for in order to request another Pasha, but the Ottoman Grand Vizier refused to receive the delegation and sent a decree to the Algerians, warning them with the following letter : "Finally, we will not send a governor to you. Pledge allegiance to whomever you wish. The Sultan does not need your obedience. We have thousands of Kingdoms like Algiers, whether it is one or none. And if you approach the Ottoman territories, you will not be satisfied."$^{:387}$ After this, the Grand Vizier sent another decree to the ports on all Ottoman coasts, as well as to the governors of Egypt and the Sharif of Mecca, requesting them to prevent the Algerians from going on the pilgrimage, selling weapons to them, and not allowing them to approach the Ottoman coasts. This implies the disruption of the Hajj pilgrimage and trade to the East, along with the potential discontent of religious authorities and the local population, in addition to the cessation of the vital recruitment of the Odjak thus threatening its existence.$^{:162–163}$

### Establishment of the Agha regime

The Diwan did not limit itself to pronouncing the pasha's forfeiture; he proposed a new form of government which was immediately adopted. The Diwan, responsible for governing affairs, has given the state's powers to twenty-four Manzoul-Agas (isolated aghas), led by the Agha presiding over the Diwan; It was agreed to replace the pasha and his officers with a certain number of members of the divan chosen from among the Isolated Aghas, officers retired from service, and who had passed through all the ranks of the militia; these Manzoul-Agas were henceforth to have the administration of all the affairs of the state, to collect the revenues of the country, both on the sea side and on the land side, and one of them who would preside over them, with the title of Aga, would be particularly responsible for distributing the pay. The diwan itself was maintained as in the past; only the number of members of this council was increased.
The leader of the coup against the system of Pashas was named Khalil Bouloukbashi. He was one of the most prominent members of the Diwan and held significant influence. The State's responsibilities were officially assigned to him in July 1659, and he assumed all previous Pasha powers. To signify his high position, Khalil was given the title "Agha".$^{:163}$
Khalil Agha began his rule by implementing measures to organize the state's finances and provide additional resources for the treasury. He did so by heeding the petitions of local and foreign merchants, abolishing all unjust fines imposed by the previous Pashas, and, furthermore, reducing customs duties to stimulate trade.$^{:210}$ He also paid special attention to the issue of taxation, evident in the strict enforcement placed on taxpayers and the replacement of some questionable tax collectors with others from the ranks of the isolated Aghas.
Thanks to his astute management, Khalil successfully paid the full salaries of the Janissary soldiers on time, even achieving a surplus that was deposited in the treasury. This earned him the respect and satisfaction of the Odjak, to the extent that they affectionately referred to him as "Baba Khalil."

## Aftermath
### Political development

This new government, though described as "Republican" by the French political thinker Montesquieu, faced a period of uncertainty between the years 1659 and 1711, because out of the 16 sovereigns that assumed power in the regency, 15 of them were assassinated, this was due to the fact that the power of the Aghas and the Deys was limited by the Divan of Algiers, and also the Pasha position, even though ceremonial at this point, was still a proof of legitimacy that the de facto rulers of Algiers lacked, which made these elected governors fall to plots very often. Yet by overseeing a complementary policy between the possessors of military and financial power through institutionalization, the Ottoman Algerian elite was eventually successful in setting up a political system that survived crises without internal warfare and permitted de facto independence from the imperial authority of the Sublime porte. In 1710, Baba Ali dey established an orderly transfer of power within the Ottoman Algerian elite.

### Relations with the Ottoman empire

Following the death of Köprülü Mehmed Pasha and the succession of his son Köprülüzade Fazıl Ahmed Pasha as the Grand Vizier in the last days of October 1661, the Algerian envoys contacted Kara Mustafa Pasha,$^{:164}$ one of the ministers of the Imperial Divan, and presented him with valuable gifts to intercede on their behalf with the Grand Vizier. The latter forgave them and expressed his readiness to send a new pasha to Algiers.$^{:388}$
The Qapuji Sultan, Boshnaq Isma'il Pasha bin Khalil, assumed the position of Pasha in Algiers. The new governor was warmly received by the Algerians upon his return almost three years after the coup began. He arrived in Algiers on May 6, 1662,$^{:204–205}$ representing the Sultan, and was received with great enthusiasm and respect by the Algerians. Accommodations were arranged for his stay in the Janina Palace. As for the previously agreed terms, the Diwan of Algiers provided him with a salary and covered all expenses for his household and himself, on the condition that he would not interfere in state affairs and would not leave except by permission, thus having no more than an honorary title.$^{:164}$
Tal Shuval would describe the Ottoman Algerian relations with the Imperial centre as following:
   From the revolution of the aghas onwards, a very 'Ottoman' behaviour characterized the Algerian elite regarding the imperial centre: a constant demonstration of loyalty to the empire and its governors, together with a jealous guarding of the province's autonomy vis-à-vis the same centre.
While some authors interpreted the "Aghas revolution" as a mere episode of disobedience linked to the regional reorganisation of the Ottoman empire, basing this claim on the maintaining of the pasha position within the Regency of Algiers, yet this revolution brought a number of significant changes:
* Effective rule was now held by the militia of Algiers, reducing the pasha position to a ceremonial role.
* Intensified diplomatic relations with foreign powers.
* The Divan of Algiers had to bear the expenses of the soldiers and payment of salaries to the officers and all employees of the government.
* Eventual attribution of the pasha title to the Dey of Algiers from 1710 onward.
This state of affairs indicate the de facto independence of Algiers from what was left of the already loose Ottoman suzerainty. The Ottoman empire was no longer interested in extending its influence in the western Mediterranean as it had been in the 16th century, yet the Deys still enjoyed political and religious support from the Ottoman sultan through the pasha title they held in Algiers, which was more indicative of their need for legitimacy and protection rather than effective authority from the Sublime porte.