# Odjak of Algiers

The "Odjak of Algiers" (also spelled Ujaq) was a unit of the Algerian army. It was a highly autonomous part of the Janissary Corps, acting completely independently from the rest of the corps, similar to the relationship between Algiers and the Sublime Porte. Led by an Agha, they also took part in the country's internal administration and politics, ruling the country for several years. They acted as a defense unit, a Praetorian Guard, and an instrument of repression until 1817.
The Odjak of Algiers was a faction in the country which encompassed all Janissaries. Its main institution was the diwân of Algiers which was established in the 16th century by Hayreddin Barbarossa and seated first in the Djenina Palace [fr], then at the kasbah citadel. This assembly, initially led by a janissary Agha, evolved from a military 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.They also often controlled the country, for example during the period of Aghas from 1659 to 1671.

## Background

When Oruç Barbarossa thought of transforming himself from corsair to Sultan and founder of a state, he had no other soldiers than the crews of his ships, commanded by his corsair captains, his old companions, who accepted by mutual agreement in Algiers the supremacy that they had recognized at sea to their happy leader. The first Barbarossa therefore saw himself invested with power freely accepted by a military oligarchy; but this power quickly became absolute, and its possessor soon affirmed it as such, treating with the utmost rigor those who tried to escape it. When he died, his brother Hayreddin succeeded him by right without anyone opposing it. Pressed by necessity, he declared himself vassal of the Ottoman Porte, and obtained from it a troop of 2000 janissaries, to which were added nearly 4000 Turkish volunteers, who were admitted to participate in the privileges of the janissary corps.
To manage state affairs and govern the country, Barbarossa relied on carefully chosen janissary members of the diwân council. However this hampered the absolute power of the sovereign in the long term; the first Janissaries named their leaders through election, later, they regulated advancement in their body by immutable laws; their customs removed them from common jurisdiction and the very punishments inflicted on them were secret. This state of affairs made the Algerian Odjak an autonomous political and military entity, the authority of the Ottoman governor was made symbolic and the janissaries in Algeria would rise to power through an elective government system.

## Stratocratic elite
### Private janissary Diwan
#### Composition of the private Diwan

According to historian William Spencer, any recruit could rise through the ranks, one every three years. Over time, he would serve among 24 janissary Bolukbachi (senior officers), who voted on high policy. Ottoman Algerian dignitary Hamdan Khodja indicates that sixsty Bolukbachis, or senior officers were those that form the private Divan. They met every morning at daybreak in a room intended for their deliberations on the acts of the administration by virtue of the powers conferred on them as a superior body army chiefs. He states: "One can only be part of the divan after having fulfilled certain conditions required by the regulations, including a must have given proof of experience and capacity and having served in the army and navy; almost all those who belong to the divan are of advanced age and married to natives."
The Odjak militia constituted both the government and the army of the regency, and the distinction between the two is not always obvious. Thus, it is from the same corps of Janissaries that the civil servants of the state were drawn, and the holders of the highest ranks indeed have political or administrative roles. This was the case, for example, of the oldest bölükbashi from whom ambassadors to foreign courts were chosen. It was within combat units, at sea or on land, that the Khodja corps trained its men, and it was this corps that ensured the administration of the Regency as well as that of the army. Even former corsair captains found roles in state service as dragomans to European consuls. Since the pashas sent from Istanbul had lost all effective influence on the decisions of the odjak, towards the 1660s, it was always the elected member of the militia who held power, and who then became both the political and military leader of the Regency.

#### Janissary Agha

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". During the Agha period (1659–1671) he was the ruler of the Regency, holding the title of Hakem. The Agha was the holder of the Fundamental pact ('Ahad aman) of 1748. It was often considered the constitutional basis of the Regency. According to Hamdan Khodja:
   The head of this divan is called Aghat-el-Askar; he carries a saber and a kind of relic which contains the regulations of the regency (their charter); The agha must always carry this relic with him and never part without it.
A list of all the officers whose seniority could bring them to the position of agha was presented to the janissaries, who either approved the appointment of the oldest or chose one of the following. To prevent the agha from clinging to power, the duration of his presidency was made very limited; The office of president of the divan lasts only two months; each member is president in turn by order of seniority. Other additional precautions were added; At the end of his command, he was admitted to retirement, lost the quality of janissary and could no longer attend the assembly. The agha could also be suspended by the assembly, the interim being then provided by the Kahia. The hierarchy also included:
* Bach-bolukbachi; First of the officers by the right of seniority.
* Around 20 Yabachis; Officers recognizable by their white plume, attached to the pasha and escorting him to the mosque on Friday.
* Maaloukbachi; Spokesperson of the janissaries, who reported to the Pasha on the requests and grievances of the militia.
* 4 Soldachis; Officers who played the role of advisors to the agha, "They were allowed to be close to the pasha and ate in his table"
* Around 30 officers commanding the camps, each camp comprising between 300 and 400 janissaries.

#### Tasks of the private Diwan

All that relates to the high external or internal policy of the regency is decided by the members of the Divan. When there is some disorder in the interior, for example: a revolt among a tribe, or when a road is intercepted, they take information on this subject and give their opinion on the means that one should take to restore order. The payment of soldiers is made only in the presence of this president or chief. For in Algiers the state treasury is only opened in the presence of the Khoja or state notary and a special commission, of which each member holds a key; each of the members of this commission presents himself with his register to note the entry and exit of funds from the treasury. The dey himself cannot dispose of the public treasury; he presents himself as a simple soldier to receive his pay, or civil list.
It is within the powers of the President of the Diwan to administer justice in his locality on the Turks and Koulouglis who have failed in discipline or who have broken the laws. Therefore, they cannot enter any prison, except that of the diwan. In cases falling within the ambit of military usages and regulations, the judges of any criminal or correctional litigious dispute, may contact the "Qadi" for his opinion and for the application of the laws; If there is some penalty to be inflicted, it is the president of the diwan who orders its execution, which must take place in the room of the diwan. This gives compulsory force to the decisions of the Qadi, who addresses himself to the diwan to have his judgments executed, since regular soldiers were never judged by civil laws like the moors, but by military laws.

#### End of the private janissary diwan

In 1805, the Janissaries, following a popular riot, attacked the Jews. Busnach and Bacri's company had large stocks of wheat as the famine raged. Dey Mustapha Pasha (1798-1805) [ar; fr; uk] exiled Jewish families and seized their property. These measures being judged insufficient, the Janissaries seized the dey and put him to death. In 1808, a new revolt: the Janissaries were dissatisfied with the evolution of the Tunisian war, Napoleonic demands, the release of Italian captives and the installation of the Dey's wife in the Djenina. Dey Ahmed was killed, and replaced by Ali al Ghassal, who was himself strangled following a new riot. The diwan was thereafter completely eclipsed by the authority of the dey Hadj Ali. In 1817, the Janissaries accused the Dey Omar Pasha of treason and cowardice, for having agreed under pressure from the local population and the Koulouglis and even from some of the Janissaries, to negotiate with Lord Exmouth. He was seized and killed, and replaced by Ali Khodja (1817–1818). Suddenly, the new dey saw fit to leave the Djenina for the Kasbah above the city and to settle there under the protection of Koulouglis and Kabyle soldiers. With this support, he imposed himself on the Janissaries. The Janissaries returning from Kabylia were attacked in their barracks and were diminished in number. Thus the military finally found itself reduced to obedience.

## Composition

Algiers has known the hightest number of troops during the first half of the 17th century, this was demonstrated through the construction of two barracks (Eski and Yine Barracks in Algiers in 1627 and 1637 respectively), However, the number of the Janissaries went on a steady decline from the mid 18th century onwards; New recruits were insufficient to recover the military might of Algiers that was known a century prior, though efforts were made to compensate this void by recruiting local militias from the "Koulouglis", Zwawas and Arab tribes.

### From the Ottoman Empire

The Odjak was initially mainly composed of foreigners. Commonly called by Europeans "Odjak" or "Turkish militia". The denomination "Turk", referred to the geographical and ethnic origin of most members of this militia, to their language, and to their belonging to a culture distinct from that of other Algerians. The majority of the unit during the 16th to 18th century were composed of "Anatolian Turks". But they also included Albanians, Greeks, Circassians, Maltese etc... They were recruited manly from Smyrna in the Ottoman Empire, or in some cases from immigrants. The "Turks" therefore constituted the main element of the militia. Their distribution in the various military components of the odjak may indicate momentary changes in the regions of recruitment, but the majority of the recruits were from Anatolia, according to M. Colombe: "Of all the regions of the Empire, it was Anatolia that provided the major part of the Algerian recruitment". The exact size of the Odjak varied from 8,000 to 10,000, and was usually divided into several hundred smaller units (ortas).

### Kouloughlis

Kouloughlis were people of mixed Ottoman and Moorish origins. In 1629 the Kouloughlis, allied with many other local tribes, attempted to drive out the Odjak and the janissaries. They failed and were expelled. In 1674, they were allowed to join the corps, but only first generation kouloughlis (direct sons of Turks). In 1694, this was relaxed, and all Kouloughlis were allowed to join the odjak.

### Moors

Despite the fact that previously all locals had been barred from joining the Odjak, Arabs, Berbers, and Moors were allowed to join by the end of the 17th century in few numbers, as a way to replenish the unit, as time passed, and relations became more and more distant between the Ottoman Empire and the Regency, importation of troops became more and more problematic. Initially, some locals were allowed to join the odjak as garrison auxiliaries. This became more and more common, but only in isolated areas. As many Between 1699 and 1701, out of 40 cases of janissaries whose origins are mentioned, 5 had been recruited among the natives, but these were in mostly rural areas. In reality, the corps was still overwhelmingly Turkish. After a coup by Ali Chauch the Odjak was weakened, and the Dey-Pacha had far more authority than before. He weakened the janissaries, and forced them to lax their procedures. As time passed, these procedures were more and more lax. As the Odjak was the main force outside of the unreliable Arab-Berber tribal levy whom were in a lot of cases regarded as unloyal, it was thus important not to recruit people who would have tribal loyalties. Thus many Algerian orphans and criminals were recruited into the Odjak. In 1803, 1 in 17 troops of the Odjak were Arab or Berber. According to historian Daniel Panzac, about 10-15% of the Odjak was composed of native Algerians and renegades, however Kouloughlis were barred from joining the Odjak. By the 1820s, even Jews were allowed to join the Odjak of Algiers, although this was a highly controversial choice, and denounced by several members of Algerian society.
Paper strength of the Algerian Janissary corps :
| Year | 1536 | 1587 | 1605 | 1621 | 1640 | 1660 | 1684 | 1731 | 1754 | 1785 | 1808 | 1815 | 1830 | 1830 |
| Strength | 2,000 | 6,000 | 10,000 | 6,000 | 12,000 | 6,000 families | 14,000 | 14,000 | 12,000 | 8,000 | 10,000 | 4,000 | 4,500 | 3,500 expelled after French occupation |

### Janissary corsairs

In early 19th century, the naval power of Algiers could fill some fourteen percent of the full size of the odjak infantry, the mehallas numbered around 2,500 janissaries, while the navy used 800 to 900 men. Thus, it was mandaory to serve on board of a corsair ship for the militia in the Algerian odjak. The ratio of janissaries aboard was not known though, it could be guessed that one janissary for three navy crews were aboard the Algerian corsair ships if the total number of sailors in this period was about 2500 men. A document on the Algerian navy in 1820 states: "each complement of ship’s personnel includes, in addition to its crew of sailors, a garrison of infantry formed from the Turkish militia, of not more than a hundred men for the frigates, and not less than forty men for the schooners and polaccas."
   These soldiers assigned during the year for service at sea were taken aboard vessels that belonged to private individuals as well as those that belonged to the state. It was the new recruits who were assigned to serve at sea. They took their rifles, pistols, swords, and a blanket for sleeping; their entire equipment. The beylik provided neither bunk nor hammock nor mattress; he supplied old sheets for binding up wounds and a medicine chest . . . [They] were not involved in ship manoeuvres; they were assigned to the musketry and to be the first to make boardings with knives and swords. Their stations were on the quarter-deck, where soldiers could not go without permission, except to serve them.

## Barracks

Living commonly in large barracks just like professional armies around the world, the Janissaries of Algiers were lodged in seven or eight such barracks in Algiers, each housing around 700 and 800 all the way up to 2,000 men. As it was usual for Odjak officers to own slaves, the work required to keep the barracks in good condition was largely performed by these slaves. Hense why the Barracks had a notoriety for being nicely built, ideally organized and cleaned.
The janissaries enjoyed many advantages; they bought their food at a special price, lower than that set for the population; single ones were allowed four loaves of bread per day. They could own their barracks; those who were not married stayed in houses built on the type of Moorish house, with one room per odjak and small rooms for the boulouk bachi. In Algiers, there were eight barracks, some of which were very pretty. These barracks were much more comfortable and pleasant than anywhere else in Europe at the time. In each there was, as in the mehala, at each section, a wakil and an atchi (cook). Married janissaries lived with their families; in the 16th century, there were nearly eight hundred households in Algiers. They were also subject to a special justice, that of their officers; it included severe penalties (imprisonment, caning and even death penalty), but inflicted in private, so that the Turks would not be humiliated in front of the natives.
The Janissary pay registers kept at the National Library of Algiers mention eight barracks:
* Mouqarrir barracks (reader barracks: the muqarrir is the one who makes a communication, a presentation). It was located in the old rue Macaron. It consisted of 27 rooms, housing 899 men, trained in 48 odjak (section).
* Bab-Azoun barracks included 28 rooms and housed 1661 men trained in 63 odjak.
* Salih Pasha and Ali Pasha barracks were neighboring each other, each comprising a spacious courtyard surrounded by arcades, and dominated the port rampart. Sometimes they were designated by the name "kapılar" (the doors); also known as "Yechil Qapouda Ali Pasha" and "Yechil Qapouda Salih Pasha". They were located between rue Boza and rue de l'Aigle near Azoun. The Salih Pasha barracks included 26 rooms, where 1,266 men comprising 60 odjak were housed; that of Ali Pasha had 24 with 1516 men forming 55 odjak.
* Ousta Moussa barracks, in rue de la Marine (the French actually have the Lemercier barracks). It included 31 rooms occupied by 72 odjak with a workforce of 1833 men.
* Yali barracks, or "Bord de la Mer" located opposite the Ousta Moussa barracks, also called "Dar ed-droudj" (Stairs barracks), with 15 rooms housing 602 men divided between 27 odjak.
* Eski (old) barracks, in rue Médée, with 31 rooms bred for 60 odjak, or 1089 men.
* Yeni (new) barracks, in the same street, had only 19 rooms, with 38 odjak or 856 men.

## Command structure of the Odjak
### Leadership, and commanders

The command structure of the Odjak relied on several tiers of military commanders. Initially based on basic Janissary structures, after the 17th century it was slightly changed to better fit the local warfare styles and politics. The main ranks of the Odjak were:
* Agha, or marshall of the Odjak. Elected by the Odjak until 1817, after which the Dey appointed the Aghas.
* Aghabashi, which was equal to the rank of General in western armies
* Bulukbashi, or senior officer
* Odabashi, or officer
* Wakil al-Kharj, a non-commissioned officer or supply clerk
* Yoldash, or regular soldier

### Main units

The army was divided into 4 regions, the exact same regions as the administrational ones (Beyliks).
* Western Army, headed by the Beys of Mascara/Oran
* Central Army, headed by the Bey of Titteri
* Eastern Army, headed by the Bey of Constantine
* Dar as-Soltan army, headed by the Dey and the Agha.
These troops were headed by the Beys, and a Khalifa (general) appointed by them. The supreme commander of the army was the Agha al-Mahalla Levying these troops was the job of the Bey. The Odjak was headed by an Agha elected by the Odjak itself. When Algiers came under attack, the Beyliks would send their troops to help the besieged city, such as in 1775 during the Spanish Invasion of Algiers. As the Beys were regional commanders, they also fought the wars in their own region, occasionally reinforced by troops from the Dar as-Soltan army. For example, in 1792, during the reconquest of Oran, the Bey Mohammed el Kebir, was the one to besiege the city using the army of the Beylik of the West, numbering up to 50,0000 with some additional reinforcements from Algiers. During the Algerian-Tunisian war of 1807 the Eastern army fought against the Tunisians. Its composition was 25,000 levy warriors from Constantine, and 5,000 reinforcements from Algiers. Sub-commanders usually included powerful tribal sheiks, djouads [fr], or qaids.

### Spahis of Algiers

Not much is known about the spahis of Algiers, other than the fact that they were a regular standing unit, mainly composed of locals, although there were Turks amongst them. They differed greatly from the traditional Ottoman sipahis, in both military equipment and organization, and hardly had anything in common with them other than their names, and both being cavalry units. The Dey also periodically had several thousand spahis in his service acting as a personal guard. Other than the Dey's guard, Spahis were not recruited or stationed in Algiers, instead being usually recruited by the Beys. They were usually more organized than the irregular tribal cavalry, although far less numerous.
The French Spahi units were based on the Algerian spahis, and they were both mainly light cavalry.

### Levy warriors

The levy militia composed from Arab-Berber warriors numbered in the tens of thousands, being overwhelmingly the largest part of the Algerian army. They were called upon from loyal tribes and clans, usually Makhzen ones. They numbered up to 50,000 in the Beylik of Oran alone. The troops were armed with muskets, usually moukahlas, and swords, usually either Nimchas or Flyssas, both of which were traditional local swords. The weaponry wasn't supplied by the state, and instead it was self-supplied. As nearly every peasant and tribesman owned a musket, it was expected from the soldiers to be equipped with one. As many of these tribes were traditionally warrior ones, many of these troops were trained since childhood, and thus were relatively effective especially in swordsmanship, albeit they were hampered by their weak organization, and by the 19th century their muskets became outdated.

### Modern style units

Algiers hardly possessed units based on Napoleonic or post-Napoleonic warfare, and many of their units, including the Odjak of Algiers were organized on outdated 17th and 18th century Ottoman standards. The only two main units which existed as Modern-style units were the small Zwawa guard established by Ali Khodja Dey in 1817 to counter-balance the influence of the Odjak, and the small army of Ahmed Bey ben Mohamed Chérif, the last Bey of Constantine, who organized his army on the lines of Muhammad Ali's Egyptian Army. Ahmed Bey's army was composed of 2,000 infantry, and 1,500 cavalry. His entire army was composed of native Algerians, and he also built a complex system of manufactories to support the army and invited several foreigners to train technicians and other specialists.