Answer: In response to your question, it is permissible for a Muslim to offer condolences to a non-Muslim.
This practice has been transmitted from some of the pious predecessors (Salaf), who would offer condolences to Christians. For example, they would say to a Christian:
"Alayka Bi At-Taqwa Allah Wa As-Sabr"
This means: "Upon you is the Taqwa (fear and consciousness) of Allah, subhanahu wa ta'ala, and upon you is patience."
It has also been transmitted from Hassan Al-Basri (may Allah have mercy upon him) that he would say to a Dhimmi (a non-Muslim living under the authority of a Muslim government):
“If you are going to give condolences to a Dhimmi, say to him: May nothing but good (Khair) afflict you.”
Additionally, it was reported that Ishaq Ibn Rahuyah would offer condolences to the Mushrikeen (polytheists) by saying:
“May Allah increase your wealth and children.”
Specificity to Certain Categories of Non-Muslims:
These condolences may be specific to three categories of non-Muslims:
- Dhimmi: A non-Muslim living under Muslim authority.
- Muahid: A non-Muslim who has a treaty or contract with Muslims.
- Musta'min: A non-Muslim granted safety or protection by Muslims.
As for the Muharib (a non-Muslim actively fighting against Muslims), it does not seem appropriate to offer condolences to them.
Evidence from the Quran:
Allah, the Exalted, mentions in the Quran:
"Allah does not forbid you from being dutiful and kind to those who have not fought you in matters of religion nor driven you out of your homes." (Quran 60:8)
This verse indicates that it is permissible to show kindness and offer condolences to non-Muslims who are not hostile toward Muslims, such as the Dhimmi, Muahid, and Musta'min.
Conclusion:
It is permissible to offer condolences to non-Muslims who are not at war with Muslims and who do not seek to harm or expel Muslims from their lands. This includes the Dhimmi, Muahid, and Musta'min. However, this does not extend to those actively fighting against Muslims.
Knowledge ultimately belongs to Allah, the Exalted, and He knows best.
— Answered by Ustadh Abdulrahman Hassan