Constitution writing has proven to be an extremely divisive affair in post-authoritarian Egypt and Tunisia. One of the most important sources of contention has been the role of Islamic law in the state. This article argues that pre-modern Islamic law itself includes important principles of public law that are consistent in important respects with the foundations of modern democratic governance. The principles of Islamic public law have been obscured to most researchers because of an unwarranted focus on the rules governing the selection of rulers and the fact that many of these rules arise interstitially in topics of private law. Once these particular rules are analyzed carefully, it turns out that the foundational principle of pre-modern Islamic public law is the idea of a principal-agent relationship between public officials and the Muslim community. This relationship in turn simultaneously authorizes and limits the rule making power of public officials by requiring that their actions conform to the terms of their appointment, and explains secondary doctrines of Islamic public law such as sovereign immunity, the requirement that the acts of public officials be limited to public interests, and the requirement of public rationality in decision making. These and other doctrines, this paper argues, substantially overlap with important principles of democratic constitutionalism and suggest the possibility that Islamic public law can provide important grounds in support of modern democratic constitutionalism in the Arab world.