The legal system of Afghanistan consists of Islamic, statutory and customary rules. It has developed over centuries and is currently changing in the context of the rebuilding of the Afghan state. The supreme law of the land is the Constitution of Afghanistan. In addition, there is complex legislation which stems from different historical periods. For instance, the so-called four volumes of civil law were developed on the basis of Egyptian models and promulgated in the time of the monarchy. Other legislation came into force under of President Daoud Khan, the Democratic Republic (1978-1992), the Mujahideen (1992-1996), the Taliban regime (1996-2001) and the current Islamic Republic of Afghanistan. Article 130 of the Afghan Constitution establishes that judges must apply the constitution and legislation and may only resort to Hanafi fiqh (one of the Schools of Islamic Law) if a necessary legal rule cannot be found in the written laws.
Under the Taliban, there was no rule of law or independent judiciary. Ad hoc rudimentary judicial systems were established based on Taliban interpretation of Sharia (Islamic law). Murderers were subjected to public executions and thieves had a limb or two (one hand, one foot) severed. Adulterers were stoned to death in public. Taliban courts were said to have heard cases in sessions that sometimes lasted minutes. Prison conditions were very poor and prisoners were often not given much food. Normally, this was the responsibility of the prisoners' relatives, who were allowed to visit to provide food once or twice a week. Those who had no relatives had to petition the local council or rely on other inmates.