Hisbah
Hisbah (, 'accountability') is an Islamic doctrine referring to upholding "community morals", based on the Quranic injunction to  "enjoin good and forbid wrong". In pre-modern Islam, Hisbah was not just a doctrine but an office charged with "maintenance of public law and order and supervising market transactions", covering salat prayers, "mosque maintenance, community matters, and market dealings", whose functionary was called a muhtasib. Later, the celebrated Islamic scholar Al-Ghazali (d.1111), used "Hisba" as a "general term for forbidding wrong", and specifically for the "duty of individual Muslims" to forbid wrong and command right. He also used the term "muhtasib", but for any Muslim who carried out the duty. What is "good" and what is "wrong" are based on the norms of sharia (Islamic law), according to scholars. How right is commanding and wrong forbidden can be divided into “three modes” according to an oft quoted prophetic hadith—by “hand”, i.e. using force; “tongue” i.e. verbally; by the “heart” i.e. silently. Scholars and Islamic schools of law (madhhab) differ regarding who precisely was (and is) responsible for carrying out the duty, to whom it was to be directed, and what its performance entailed—schools of law differ over whether Hisbah is an individual or collective duty, for example. Who is eligible to use force (their "hand") to command and forbid is disputed, some reserving it for the political authorities such as the muḥtasib and their subordinates. Others, like  Al-Ghazali, argue that these modes extended to all qualified believers. Pre-modern Islamic literature describes Islamic revivalists (usually scholars) taking action to forbid wrong by destroying forbidden objects, especially containers of alcoholic beverages and musical instruments, and disrupting  forbidden activities, such as  chess games and association of unmarried members of the opposite gender. In the contemporary Muslim world, various state or parastatal bodies—often with phrases like the "Promotion of Virtue and the Prevention of Vice" (Saudi Arabia), or "Hisbah" (Nigeria) in their titles—have appeared in Iran, Saudi Arabia, Nigeria, Malaysia, etc., at various times and with various levels of power. Wrongdoing targeted by these groups includes inadequate hijab covering, lack of gender segregation, failure to observe salat,  consumption of alcohol and public displays of affection. A slightly different spelling of the same triconsonantal root, ḥisāb () refers to "the reckoning" of Judgement Day in Islam, where those resurrected from the dead are judged to be sent to heaven or hell.<ref>{{cite book |last1=Smith|first1= Jane I. |first2= Yvonne Y. |last2=Haddad |date=1981 |title=The Islamic Understanding of Death and Resurrection |location=Albany, N Y |publisher=SUNY Press |url=https://vdoc.pub/download/the-islamic-understanding-of-death-and-resurrection-1fa354cla15g |page=63|ref=JISYYHIU1981}}</ref>

Scriptural basis

Answering the question of why there is a duty among Muslims to carry out the duty of hisbah and forbid wrong are statements in the Quran and hadith. Quranic verses 3:104, 3:110, 9:71, 9:112, 5:105, 31:17 all contain some variation of the phrase "enjoining what is right, and forbidding what is wrong". In contrast,  another verse: "O believers! Look after your own souls. He who is astray cannot hurt you, if you are rightly guided" (Q.5:105), seems to sound  "like an invitation to forget about forbidding wrong", though scholars agree the straightforward meaning of the verse is not to be acted on. A famous sahih hadith states: "Whoever amongst you sees an evil, he must change it with his hand. If he is not able to do so, then with his tongue. And if he is not able to do so, then with his heart, and that is the weakest form of faith". Terminology, definitions
Definitions
Sources give different definitions and uses for Hisbah. The Hans Wehr Dictionary of Modern Written Arabic defines ḥisba () as an "arithmetical problem, sum"; from the root verb ḥasaba, "to compute, reckon, calculate, ...". According to Sami Zubaida's book Law and Power in the Islamic World, Hisbah means "accountability". According to Attahiru, Al-Aidaros, and Yusof  hisbah is "the application of principles" of  enjoining what is good and forbidding what is bad. And Human Rights Watch states "the Arabic term hisbah means an act which is performed for the common good". Uses
The term of hisbah has a number of uses. According to Human Rights Watch, Islamic "Scholars have generally interpreted" Quranic verses and hadith on enjoining good and forbidding wrong (mentioned above) as "placing duties upon Muslims" at both an "institutional" and "personal level". Hisbah is intended "as a mechanism to ensure the welfare of society and to combat harm, including crime", at the institutional level. At the personal level, it is intended "to instill in each individual the wish to act to prevent something bad from happening, or, if it is not possible to prevent it oneself, to denounce it and call on others to act in order to prevent it." Muhtasib

Traditionally, in classical Islamic administrations, there was an office of al-hisbah, an inspector of "markets and morals", the holder of which was called a muhtasib. He was appointed by the caliph to oversee the order in market places, in businesses, in medical occupations, etc. Falling roughly between the offices of judge (qadi) and court magistrate, he "had no jurisdiction to hear cases—only to settle disputes and breaches of the law where the facts were admitted or there was a confession of guilt." The  office was found  throughout  Islamic history in many states, though how it functioned seems to have varied. Muhtasibs in the later time of Mughal emperor Aurangzeb in India (1658 to 1707 C.E.) were known for enforcing puritanical regulations, such as destroying non-Muslim "idols, temples, and shrines" in the majority non-Muslim country, eliminating the Muslim confession of faith "from all coins" so that it would not be "defiled by unbelievers" using the coins. Muhtasibs during the Buyid dynasty of the Abbasid Caliphate (after 950 C.E. ), on the other hand, bought their office for 20,000 dirhams per month, and while not known for any particular interest or expertise in sharia, were very much subject to the temptation of  soliciting bribes to pay back the huge sum they paid for the office. Manuals
Hisbah was also a term for the manuals written to instruct and guide muḥtasib,  containing practical advice on management of the marketplace, as well as other things a muhtasib needed to know — for example, manufacturing and construction standards. Personal duty

Another related usage of Hisbah is as a "personal" duty of Muslims, and "general term for 'forbidding wrong'" "committed by fellow believers, as and when one encountered them." in obedience to  Quranic verses (3:110 and 9:71), mentioned above, but having no specific connection to marketplaces, weights and measures, etc. It has a later origin, and the difference in the terms and use of Muhtasib has caused some confusion. According to Michael Cook, this use is "mainly an invention" of Al-Ghazali" (1058-1111 CE), who followed a precedent set by "a somewhat earlier scholar", Al-Mawardi (d.1058) and "adopted the word hisba" as it is currently used. Al-Ghazali was "perhaps the first major Islamic thinker to devote substantial amount of space" to the two duties of commanding and forbidding, and his account of the duties  in (Book 19 of his) The Revival of the Religious Sciences, "achieved a wide currency in the Islamic world." He wrote:
Every  Muslim has the duty of first setting himself to rights, and then, successively, his household, his neighbours, his quarter, his town, the surrounding countryside, the wilderness with its Bedouins, Kurds, or whatever, and so on to the uttermost ends of earth. A large "scholastic heritage" on the subject of who was to do the forbidding, what was to be forbidden, and whom was to be told there actions were forbidden, was developed by Al-Ghazali and other medieval scholars.Hisbah different from personal duty
A slightly different definition or definitions than Al-Ghazali's comes from ʿAbd al-Ghani al-Nābulusī (d.1731), who distinguished between forbidding wrong and ḥisbah. The first being a duty by the "ordinary believer"  to call on the wrongdoer to stop, but carrying "no power or duty of enforcement", unless the offense was being committed while the believer  could intervene. The second duty (ḥisbah or "censorship"),   being the duty to enforce right conduct (ḥaml al-nās ʿalā ʾl-ṭāʿa) and reserved to authorities  (according to ʿAbd al-Ghani). Modern day hisbah
In the colonial and post-colonial eras Muslims were much more likely to be living in secular states, sometimes non-Muslim majority (Western) states, but especially in states where concepts of universal human rights, personal freedom and that there is no crime without a victim, compete with traditional Islamic values and belief in Sharia. Modern day scholars and pious Muslims complain that righting "wrongs committed by fellow believers as and when one encountered them" meets too much resistance is no longer practical. Thus  "the conception" of forbidding wrong has changed to become more systematic. In the modern era opposing wrong doing involves "the organised propagation of Islamic values," according to Cook, which requires missionary work and organisation, including often the establishment of "Islamic religious police". Two countries that specifically use the term hisbah in some area of law enforcement are Nigeria and Egypt. Nigeria
In 21st century Muslim-majority states of Nigeria, "a hisbah", is "a group expected to promote Islamic virtue, whilst discouraging vice" (or  Islamic religious police). Depending on the state, the group may be legally sanctioned with "state-wide powers" and thousands of employees funded by the state government (Kano and Zamfara states), or exist "only on paper" (Borno state). Egypt
Following the Egyptian revolution of 2011, prosecutions in Egypt of "writers, activists, artists, and bloggers" for "sexual orientation, religious beliefs, political opinions, or moral standing" increased  markedly, with the prosecutions "couched" in the concept of hisbah. Economic affairs
At least some contemporary sources  have stated the "institution" of hisbah "is aimed at controlling the unethical behaviors in economic affairs of the Muslim's society". Issues of forbidding in scholarship: By whom, to whom, about what

While scripture is clear that a community is enjoined to command right and forbid wrong, it does not indicate whether this included all Muslims  or only some; it does not give any concrete specifics of what the evil is to be forbidden or good to be commanded. Three "basic questions arising "about the duty of forbidding wrong" are who has to do it,to whom, and about what?" Differences in scholarly debates over the duty of “commanding right and forbidding wrong” stemmed from the positions taken by jurists (Faqīh) on questions regarding who precisely was responsible for carrying out the duty, to whom it was to be directed, and what performance of the duty entailed. Often, these debates were framed according to what Michael Cook calls the “three modes” tradition, a tradition based on a prophetic hadith which identifies the “heart” (qalb), “tongue” (lisān), and “hand” (yad) as the three proper “modes” by which one should fulfill the obligation. Depending on a number of factors both intrinsic and extrinsic to their legal schools, scholars apportioned this labor in differing ways, some reserving the execution of the duty by “tongue” for the scholars and by “hand” for the political authorities such as the muḥtasib, or those invested with the authority to carry out the duty on their behalf, and others arguing that these modes extended to all qualified believers.Michael Cook: Commanding right and forbidding wrong in Islamic thought. Cambridge University Press. Cambridge 2000, pp. 32-47  In modern times, the term has been used in some countries as a rationale for establishing Islamic religious police to stop wrong doing. Islamic religious police

If the "modern conception" of forbidding wrong is "the organized propagation of Islamic values", than in the late 20th century and/or early twenty first, one important way is by enforcing these values using the state's power of policing. Islamic religious police have arrisen in some Muslim majority states and regions (Saudi Arabia, Aceh province of Indonesia, Afghanistan, Egypt, and Iran). Between 1996-2001 the Taliban in Afghanistan  had a Ministry for the Propagation of Virtue and the Prevention of Vice (at different times called a Committee or a Department for the propagation ...). In Saudi Arabia, the state authority responsible for hisbah is the Committee for the Promotion of Virtue and the Prevention of Vice, or hay'a. Established in 1976, (or 1940) the committee was known for banning the sale of Pokémon'', Barbie dolls, and forcibly prevented school girls from escaping a burning school in 2002 by beating rescuing firemen and locking the school's doors (15 girls died). The once feared  Committee lost most of its power by 2016 when it was reduced to submitting reports about infractions to civil authorities. The Islamic Republic of Iran has had different institutions enforcing  proper covering (hijab) for women, preventing the mingling of unrelated men and women without a male guardian (mahram), and other infractions since shortly after the Iranian Revolution. Hisbah doctrine has been invoked by Islamic prosecutors in cases of apostasy and acts of blasphemy. In Egypt, the Human Rights group Freedom House complains, "hundreds of hisba cases have been registered against writers and activists, often using blasphemy or apostasy as a pretext". In one high-profile case, Nasr Abu Zayd, a Muslim scholar "critical of old and modern Islamic thought" was prosecuted under the statute when his academic work was held to be evidence of apostasy. 