Sharia, or sharia law, is the Islamic legal system derived from the religious precepts of Islam, particularly the Quran and the Hadith. The term sharia comes from the Arabic language term sharīʿah, Arabic: شريعة which means a body of moral and religious law derived from religious prophecy, as opposed to human legislation.
Sharia deals with many topics, including crime, politics, and economics, as well as personal matters such as sexual intercourse, hygiene, diet, prayer, everyday etiquette and fasting. Adherence to sharia has served as one of the distinguishing characteristics of the Muslim faith historically. In its strictest and most historically coherent definition, sharia is considered in Islam as the infallible law of God.
There are two primary sources of sharia: the Quran, and the Hadiths (opinions and life example of Muhammad). For topics and issues not directly addressed in these primary sources, sharia is derived. The derivation differs between the various sects of Islam (Sunni and Shia), and various jurisprudence schools such as Hanafi, Maliki, Shafi'i, Hanbali and Jafari. The sharia in these schools is derived hierarchically using one or more of the following guidelines: Ijma (usually the consensus of Muhammad's companions), Qiyas (analogy derived from the primary sources), Istihsan (ruling that serves the interest of Islam in the discretion of Islamic jurists) and Urf (customs).