Answered by Sayyidi Habib Umar bin Hafiz (may Allah protect him and benefit us by him)
Acts of terror often result in a backlash against Muslims living in the West. How should they react in these situations?
This is a test for Muslims. If they wish to pass the test, they must respond in the best way. Muslims need to clarify the truth and absolve themselves from acts which contravene the Sacred Law. They should be patient in the face of hostility. As Allah says: When the ignorant address them, say: “Peace.” If Muslims continue to clarify the truth with their words and their deeds, the reality of Islam will become manifest and those who hate Islam and those who are biased against it will not have any ground to stand on. It will become clear that a religion cannot be held responsible for the actions of a few individuals, unless the religion itself condones those actions.
This hostility is nothing strange – it is both human nature and a manifestation of the Devil working with his allies. We should look at the conduct of the Prophet ﷺ and the Companions during the days of hardship in Makkah. They showed patience, steadfastness, excellence in their dealings and avoided provoking their antagonisers and thus displayed the true teachings of Islam. The Messenger of Allah ﷺ would respond to bad treatment with good treatment and would pardon and forgive those who wronged him.
 Al-Furqan, 25:63