A nationwide judicial system in Iran was first implemented and established by Abdolhossein Teymourtash under Reza Shah, with further changes during the second Pahlavi era. After the 1979 overthrow of the Pahlavi dynasty by the Islamic Revolution, the system was greatly altered. The legal code is now based on Islamic law or sharia, although many aspects of civil law have been retained, and it is integrated into a civil law legal system. According to the constitution of the Islamic Republic, the judiciary in Iran "is an independent power" with a Ministry of Justice, head of the Supreme Court, and also a separate appointed Head of the Judiciary. History Islam According to one scholar, the administration of justice in Islamic Iran has been until recent times a loosely sewn and frequently resewn patchwork of conflicting authority in which the different and sometimes conflicting sources for Islamic law—the jurists, the actual judges, and the non-Islamic law officials of the king - disputed with each other over the scope of their jurisdictions. ... some aspects of the law always remained in the hands of the mullahs ... The village mullah was the natural arbiter in matters of marriage, divorce, and inheritance; and the exalted jurisconsult, in order to carry out the very function for which he was exalted, gave opinions on those matters of law on which he was consulted. In between the village mullah and the jurisconsult there were mullahs with courts which, while sometimes sanctioned by the royal government, depended for their power on the prestige of the presiding mullah judge as much or more than on the government's sanction Since the sixteenth century AD Iran has been the only country in the world having Shi'ah Islam as its official religion, consequently the general principles of its legal system differed somewhat from those of other countries which followed Islamic law. Among the ways, law in Iran and the rest of the Muslim world differed from European law was in its lack of a single law code. "Thirteen centuries of Islamic—more particularly Shiah—tradition" called for jurists to base decisions on their legal training as it applied to the situation being judged. There was also no appeal in traditional Islamic law. One jurists's 'discovery' of the ruling of law for a specific case would not have been invalidated by some other jurist's discovery of a different ruling for that case; only God could