Ayatollah Rohani on the permissibility of whipping someone in order to encourage him or her to observe rulings, specifically as regards to enforcing women wearing the hijab:

Fatwa, posted 4.22.2010, from Iran, in:
Religious Authority: 
Seyed Mohammad Sadeq Rohani
Fatwa Question or Essay Title: 
Ayatollah Rohani on the permissibility of whipping someone in order to encourage him or her to observe rulings, specifically as regards to enforcing women wearing the hijab:

Question: Is it appropriate what police do, as they whip the women who do not properly observe the hijab?

Fatwa: To deter someone from doing the wrong, there are different stages; beating is not on the top of them. However, if a person insists on doing the wrong act and does not attend to advices and warnings, and continues to poison the society and disgraces the personality of a [Muslim] woman, it is permitted to whip her in order to correct the society and protect a [Muslim] woman's dignity.

[Note: For other opinions on this topic, see hijab.]

استفتاء/ آیا می توان برای امربه معروف کسی را شلاق زد؟ آیا به نظر شما اینگونه عمل کردن پلیس با بد حجابان صحیح است؟وشلاق زدن به بد حجابان صحیح است؟ پاسخ ایت الله روحانی : نهي از منكر مراتبي دارد اول مرتبه كتك زدن نيست ولي بعد از آن هم اعلام و توصيه اگر اعتناء نكردند و باز جامعه را به فساد كشاندند و شخصيت زن را زير سئوال بردند براي اصلاح جامعه و حفظ كرامت زن، شلاق زدن جایز است.