From Wikipedia, the free encyclopedia - View original article
Dey (Arabic: داي, from Turkish dayı) was the title given to the rulers of the Regency of Algiers (Algeria) and Tripoli  under the Ottoman Empire from 1671 onwards. Twenty-nine deys held office from the establishment of the deylicate in Algeria until the French conquest in 1830.
The dey was chosen by local civilian, military, and religious leaders to govern for life and ruled with a high degree of autonomy from the Ottoman sultan. The main sources of his revenues were taxes on the agricultural population, religious tributes, and protection payments rendered by Corsairs, regarded as pirates who preyed on Mediterranean shipping. In European part of the Ottoman Empire, in particular during its decline, leaders of the outlawed janissary and yamak troops sometimes acquired title of Dahi or Dahia, which is derived from Dey.
The dey was assisted in governing by a divan (ديوان) made up of the Chiefs of the Army and Navy, the Director of Shipping, the Treasurer-General and the Collector of Tributes.
...Janissaries, who began to rule the provinces. Their agas and commanders took the title “Dahi,” probably from “Dey,” Dey being the title of the princes of the Barbary States of North Africa. The Janissaries ...