Sharia law is the moral code and religious law of Islam. Sharia is derived from two primary sources of Islamic law: the precepts set forth in the Quran, and the example set by the Islamic prophet Muhammad in the Sunnah. Fiqh jurisprudence interprets and extends the application of sharia to questions not directly addressed in the primary sources by including secondary sources. These secondary sources usually include the consensus of the religious scholars embodied in ijma, and analogy from the Quran and Sunnah through qiyas. Shia jurists prefer to apply reasoning ('aql) rather than analogy in order to address difficult questions.
Muslims believe sharia is God's law, but they differ as to what exactly it entails. Modernists, traditionalists and fundamentalists all hold different views of sharia, as do adherents to different schools of Islamic thought and scholarship. Different countries, societies and cultures have varying interpretations of sharia as well.
Sharia deals with many topics addressed by secular law, including crime, politics and economics, as well as personal matters such as sexual intercourse, hygiene, diet, prayer, and fasting. Where it has official status, sharia is applied by Islamic judges, or qadis. The imam has varying responsibilities depending on the interpretation of sharia; while the term is commonly used to refer to the leader of communal prayers, the imam may also be a scholar, religious leader, or political leader.