Al-jawab billahi at-taufeeq (the answer with Allah’s guidance)
It is not permitted for a Muslim to pray or visit a non-Muslims funeral or their non-Muslim’s relatives funeral. This prohibition is clearly stated in the Quran.
Allah Most High says:
“It is not for the Prophet and those who believe to pray for the forgiveness of idolaters even though they may be near of kin after it has become clear that they are people of hell-fire.” (9: 113,114)
The Messenger of Allah (Sallallahu Alaihi Wasallam) was prevented from praying for his uncle Abu Talib by Allah Most High. Similar was the case of Sayyiduna Ibrahim (Alaihis Salam).
Allah Ta’ala says:”Verily, you cannot guide whom you like, but Allah guides whom he wills-He knows best those who are guided.” (28:56)
Allah Ta’ala says: “Ask forgiveness for them, or do not ask forgiveness for them! If you should ask forgiveness for them seventy times- never will Allah forgive them.” (9:80)
Also, Allah Ta’ala says, “And never (O Muhammad ) pray (funeral prayer) for any of them (hypocrites) who dies, nor stand at his grave. Certainly they disbelieved in Allah and His Messenger, and died while they were Fasiqoon (rebellious, – disobedient to Allah and His Messenger, Sallallahu Alaihi Wasallam). (9:84)
From the above , we understand that Prophet (Sallallahu Alaihi Wasallam) was ordered not to pray or stand at the grave of the hypocrite, Abdullah ibn Ubay. However, this does not only apply to hypocrites but to unbelievers also, as they disbelieved in Allah Ta’ala and His Messenger (Sallallahu Alaihi Wasallam).
If a non-Muslim relative has no other relatives to bury him/her, then it will be permissible for the Muslim to only bury, not to pray or supplicate.
(Ma’ariful Quran Vol. 6 Pg. 433/437)
Offering condolences at the time of bereavement:
It will be permissible to visit a non-Muslim to offer one’s condolences for a family bereavement. (Ahsanul Fataawa Vol. 4 Pg. 243)
It is stated in al-Fatawa al-Hindiyya:
“If a non-Muslim dies, one may say to the deceased’s father or some other relative of his: “May God recompense you with someone better and honour you with Islam, and that He bestow you with a Muslim child
” (al-Fatawa al-Hindiyya, 5/348)
Thus, it will be permitted to visit a non-Muslim in the event of a family bereavement.
And Only Allah Ta’ala Knows Best.
Moulana Qamruz Zaman