What should I do when I see a Muslim openly committing a sin, and is it permissible to greet him and befriend him while he is doing so, and does the ruling differ if he is a non-Muslim?
The disobedient Muslim should be advised and denounced to the best of one's ability. If that is not possible, then one should denounce it in their heart and avoid sitting with them at the time of disobedience, for Allah Almighty says: "And He has already revealed to you in the Book that when you hear the verses of Allah being rejected and ridiculed, then do not sit with them until they enter into another conversation. Indeed, if you did, you would then be like them."
As for greeting and being kind to a disobedient person, it depends on the benefit and harm. If it leads to them accepting advice, then it is preferable. Otherwise, it is better to leave them as a form of denouncement, unless doing so leads to a greater harm. This relates to the issue of shunning people of disobedience and innovation, which is determined by benefits and harms. The Prophet, peace and blessings be upon him, would reconcile with some people and shun others according to religious benefit.
There is no difference between a disbeliever and a Muslim regarding the obligation to denounce the sins they openly commit, to the best of one's ability, and to avoid being kind to them, provided that this is restricted by the predominance of benefit or harm.
As for greeting a disbeliever, scholars have differed on whether it is permissible or not. Some have elaborated, allowing it for a valid benefit and prohibiting it otherwise.
Summarized from the full answer at Ftawy · reviewed Sep 2, 2026
Read the full answer on Ftawyhttps://ftawy.com/en/questions/141931