No matter where they may be, believers never make concessions about their faith, since every Muslim is a representative of Allah and His religion. For a believer who is conscious of this fact and the responsibility it entails, it cannot be fitting for him to remain in an environment where people talk against Allah and His religion. Allah forbids such an attitude:
It has been sent down to you in the Book that when you hear Allah’s Signs being rejected and mocked at by people, you must not sit with them till they start talking of other things. If you do, you are just the same as them. Allah will gather all the hypocrites and unbelievers into Hell. (Surat an-Nisa; 140)
When you see people engrossed in mockery of Our Signs, turn from them until they start to talk of other things. And if satan should ever cause you to forget, once you remember, do not stay sitting with the wrongdoers. (Surat al-An‘am; 68)
The main attribute of the members of ignorant societies is their failure to appreciate Allah’s majesty and their heedlessness of Allah’s superior power. With an ill-favored arrogance they unwisely derive from their unthinking state, unbelievers speak against Allah and His religion. This may be in the form of an explicit assault or merely implications or ignorant comments about religion in general. In any case, it is obligatory for a believer to leave that place if he is unable to rectify the situation. Remaining oblivious to it and staying on as a member of such a group is unlawful for a believer.