The originally Persian title dewan (also known as diwan, also spelled or devan/ divan) has, at various points in Islamic history, designated a powerful government official, minister or ruler.
The word is Persian in origin, and was loaned into Arabic. The original meaning was "bundle (of written sheets)", hence "book", especially "book of accounts," and hence "office of accounts," "custom house," "council chamber". The meaning divan "long, cushioned seat" is due to such seats having been found along the walls in Middle Eastern council chambers.
The word first appears under the Caliphate of Omar I (A.D. 634–644). As the Caliphate state became more complicated, the term was extended over all the government bureaus.
The divan of the Sublime Porte was the council or Cabinet of the state. In the Ottoman Empire, it consisted of the usually (except in the Sultan's presence) presiding Grand Vizier and other viziers, and occasionally the Janissary Ağa.
In 19th Century Romania the Ad hoc Divan was a body which played a role in the country's development towards independence from Ottoman rule.
In Javanese and related languages, the cognate Dewan is the standard word for council, as in the Dewan Perwakilan Rakyat or (Indonesia's Council of People's Representatives) and Dewan Negara (Senate of Malaysia).