With the Taliban's takeover of Afghanistan there are fears they will reimpose their harsh interpretation of sharia law.
Most Muslim nations incorporate elements of sharia in their legal systems, particularly in family law.
But very few carry out its punishments known as hudud, which even Muslim scholars disagree on.
- What is sharia law? -
Sharia is a system of religious law drawn from the Koran and the hadiths -- the words or actions of the Prophet Mohammed.
How it should be applied has been a subject of dispute between conservative and liberal Muslims, and it remains highly contested.
Some aspects have been widely accepted -- such as how it applies to banking -- with Western companies offering Islamic finance products to attract Muslim customers.
Hudud, which means "boundaries" in Arabic, is the punishment meted out for sins such as adultery, rape, homosexuality, theft and murder.
Extreme punishments are rarely carried out as many offences must be proved by a confession or by having been witnessed by several adult Muslim males.
Countries which follow extreme sharia law include:
- Saudi Arabia -
Sharia is the basis for all Saudi law and until fairly recently it was common for extreme hudud punishments to be carried out in public.
Homosexual acts are punishable by execution -- although usually the penalty is limited to flogging and imprisonment.
Beheadings and amputations by sword were usually carried out on Fridays, before midday prayers. In extreme cases, the condemned person is sometimes crucified after execution.
The law also allows for literal eye-for-an-eye punishment, known as "qisas", in cases of personal injury.
But the family of a murder victim can pardon a condemned person in the Sunni kingdom -- often in exchange for blood money.
- Iran -
The legal system of the Islamic republic -- which with China executes more people than any other country -- rests on sharia, but with some important differences.
Judges are allowed to weigh circumstancial evidence and unlike classical sharia Iran relies heavily on imprisonment.
However, the Shiite state does employ a range of sharia punishments, with Amnesty International criticising it in 2017 for its "persistent use of cruel and inhuman punishments, including floggings, amputations and forced blinding."
- Brunei -
The tiny and immensely rich absolute monarchy drew international outrage when it became the first country in Southeast Asia to impose extreme sharia in 2019.
Its sultan later said some measures would not be enforced, including death by stoning for gay sex and adultery.
- Afghanistan -
Since their takeover at the weekend, the Taliban have indicated they may relax their previously brutal interpretations of sharia.
The last Taliban regime confined women without a male escort to their homes and made them wear the all-covering burqa.
Extreme hudud punishments were also routinely carried out during their five years in power.
- Indonesia -
Indonesia's conservative Aceh region is the only province in the world's biggest Muslim-majority country to have Islamic law.
Public flogging is common for gambling, drinking alcohol, adultery and having gay sex. But the central government refuses to sanction beheading.
Aceh adopted religious law after it was granted autonomy in 2001 in a bid by Jakarta to quell a long-running separatist insurgency.
- Sudan -
Sudan adopted sharia law in 1983 but since then has implemented it patchily, activists say.
Death by stoning remains on the statute books but has not been implemented in decades -- although activists claim hundreds of women are flogged every year for "immoral behaviour".
- Pakistan -
Military dictator Muhammad Zia-ul-Haq introduced the widely-criticised Hudood Ordinances in 1979 as part of his sweeping Islamisation of Pakistan.
Sharia courts implementing the laws run parallel to the British-based penal code but are rarely used. They cover adultery, false accusations in court, property crimes and prohibition of drugs and alcohol.
In 2006, MPs passed the Women Protection Law, removing rape and adultery cases from the religious system.
Sharia court verdicts can now also be appealed in the mainstream courts.
- Nigeria -
Some 12 of Nigeria's 36 states -- all in the north -- apply sharia to criminal cases. Courts can order amputations, although few have ever been carried out.
- Qatar -
Flogging is still on the statute books as a punishment for Muslims who drink alcohol or have illicit sexual relations, but is rarely used. The punishment for adultery is technically 100 lashes.
Adultery is also punishable by death when it involves a Muslim woman and a non-Muslim man. But in reality, capital punishment is only used in very rare murder cases when the victim's family do not show mercy.
- The Islamic State -
Before its "caliphate" was crushed in 2019, the Islamic State group applied a fiercely brutal form of sharia in the parts of Syria and Iraq it controlled.
It ran its own courts, carried out public beheadings, stonings and amputations, pushing men suspected of being gay from the top of tall buildings.
Somalia's Al-Qaeda-linked Shabaab also enforce a brutal form of sharia.