here means the one who holds the highest authority in the state and administers its affairs.
His words, “or his deputy”: the imam’s deputy may be the judge, the minister, or the governor. This is determined by customary practice in such matters. For example, if it is the imam’s practice to appoint governors to act on his behalf in enforcing the prescribed punishments, then the governor is the imam’s deputy. If the tribal elders are the ones who enforce them, then the tribal chief acts as his deputy. If judges act on his behalf, then the judge is his deputy, and so on. The point is that this is governed by customary practice and the particular administrative system, which differs from one place to another.
His words, “other than a mosque,” include every place except the mosque. Thus, based on the apparent meaning of the author’s words, it is permissible to enforce it in a house, provided that it is witnessed by a group of believers. It is also permissible in a workplace; for example, if they are in an office, the prescribed punishment may be enforced upon him there. But it must be witnessed by a group of believers. Nevertheless, it is preferable and more appropriate for it to take place in a public place, meaning a place accessible to everyone, such as a marketplace, public gatherings, and the like.
For this reason, concerning Ma‘iz ibn Malik, may Allah be pleased with him, the Messenger, peace and blessings be upon him, said: “Take him away and stone him.” The people stoned him openly and publicly (1). Likewise, one who had drunk wine would be brought forth, and the people would strike him with their hands, palm stalks, sandals, and cloaks (2), so that it would be public, because, so long as we say that what is intended is deterrence—