A firman (; ferman), at the constitutional level, was a royal mandate or decree issued by a sovereign in an Islamic state. During various periods such firmans were collected and applied as traditional bodies of law. The English word "firman" comes from the Persian meaning "decree" or "order".
On a more everyday level, a firman was, and may still be, any written permission granted by the appropriate Islamic official at any level of government. Westerners are perhaps most familiar with the permission to travel in a country, which typically could be purchased beforehand, or with the permission to conduct scholarly investigation - such as archaeological excavation - in the country. Firmans may or may not be combined with various sorts of passports.
Farmān (also spelled firman) is the modern Persian form of the word and descends from Middle Persian (Pahlavi) framān, ultimately from Old Persian framānā (fra = "fore", Greek πρό). The difference between the modern Persian and Old Persian forms stems from "dropping the ending ā and insertion of a vowel owing to the initial double consonant". This feature (i.e. fra-) was still used in the Middle Persian form. The Turkish form of the word farmān is fermān, whereas the Arabized plural form of the word is farāmīn.
In the Ottoman Empire, the Sultan derived his authority from his role as upholder of the Shar'ia, but the Shar'ia did not cover all aspects of Ottoman social and political life. Therefore, in order to regulate relations and status, duties, and the dress of aristocracy and subjects, the Sultan created firmans.
Firmans were gathered in codes called "kanun" (from the Hellenic word kanon (κανών) meaning rule or rules, as well as the Arabic word qanun (قانون) also meaning rule or law). The kanun were "a form of secular and administrative law considered to be a valid extension of religious law as a result of the ruler's right to exercise legal judgement on behalf of the community.