I frequently visit a country where people with a beard, particularly Muslim foreigners, are suspected of involvement in terrorist activities, and are often subjected to harassment and what may be even worse. Is it permissible not to wear a beard in this case? What if wearing a beard causes difficulties at work?
Wearing a beard is said by some scholars to be obligatory to Muslim men, but other scholars maintain that it is a Sunnah. This latter view is perhaps more weighty. If we accept the view that it is a Sunnah, then there is no obligation on a Muslim man to wear a beard and one can choose according to one’s circumstances. Even if we consider it obligatory, the obligation is waived if compliance exposes a person to serious danger.
One must balance all considerations. There is certainly no virtue in unnecessarily exposing oneself to serious danger, as a result of maintaining what is essentially a Sunnah. If the case is true, it is permissible to try to avoid that danger by pretending that one does not belong to what exposes him to that danger.