[6] 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.
[7] This assembly, initially led by a janissary Agha, evolved from a military body, the Odjak of Algiers, into the country's primary administrative institution.
[11] To manage state affairs and govern the country, Barbarossa relied on carefully chosen janissary members of the diwân council.
[12][13] 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.
[15] 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.
[17] 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.
[19] 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.
[23] According to Hamdan Khodja:[24] 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.
[25] 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 hierarchy also included:[25] 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.
[27] 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.
Dey Mustapha Pasha (1798-1805) [ar; fr; uk] exiled Jewish families and seized their property.
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.
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.
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.
But they also included Albanians, Greeks, Circassians, Maltese etc...[34] They were recruited manly from Smyrna in the Ottoman Empire, or in some cases from immigrants.
[33] The exact size of the Odjak varied from 8,000 to 10,000, and was usually divided into several hundred smaller units (ortas).
[35][37] 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.
[41] 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.
[43] 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.
Initially based on basic Janissary structures, after the 17th century it was slightly changed to better fit the local warfare styles and politics.
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.
[46] 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 levy militia composed from Arab-Berber warriors numbered in the tens of thousands, being overwhelmingly the largest part of the Algerian army.
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.