Dey (Arabic: داي, from Turkish Dayı ) was the title given to the rulers of the Regency of Algiers (Algeria) and Tunis (Tunisia) under the Ottoman Empire from 1671 onwards. Twenty-nine deys held office from the establishment of the deylicate 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.
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.
The dey's realm was divided into three provinces (Constantine, Titteri and Mascara), each of which was administered by a bey (باي) whom he appointed.