Shaykh Al-Islaam Ibn Taymiyyah (may Allah have mercy upon him) was asked:

Question:

A group of Muslims are neighbors to Christians. Is it allowed for a Muslim to visit a Christian if he is sick? If he dies, can he follow his funeral? Is it there a sin for the one who does that from the Muslims or not?

Answer:

“Allah praise is due to Allah the Lord of the Worlds. He does not follow the funeral. As for visiting him, then there is no harm. That can be a benefit to encouraging him to Islam. If he dies as a disbeliever, then the hell-fire is obligatory upon him. So like this, he cannot pray for him. And Allah knows Best”

[Majmoo’ al-Fataawa (24/256)]

This was also the ruling of the Permanent Committee as they were asked:

Question:

What is the ruling on attending a disbeliever’s Funeral as this is a political tradition and common custom?

Answer:

Muslims are not allowed to bury the corpses of disbelievers as long as disbelievers can do so. Muslims are also not permitted to participate or help disbelievers in burying their dead in order to follow political traditions. This was not done by the Prophet (peace be upon him) nor by the rightly guided Caliphs. Allah forbade His Prophet (peace be upon him) to stand at the grave of `Abdullah ibn Ubayy ibn Salul, because he was a disbeliever. Allah (Exalted be He) says:

And never (O Muhammad صلى الله عليه وسلم) pray (funeral prayer) for any of them (hypocrites) who dies, nor stand at his grave. Certainly they disbelieved in Allâh and His Messenger, and died while they were Fâsiqûn (rebellious, – disobedient to Allâh and His Messenger صلى الله عليه وسلم

If there are no disbelievers who can bury their dead, Muslims should do so. This was done by the Prophet (peace be upon him) with regard to the disbelievers who were killed during the battle of Badr. When his uncle Abu Talib died, the Prophet (peace be upon him) said to `Aly: “Go and bury him.”

The Permanent Committee for Scholarly Research and Ifta’

[Reference]

Translated by

Faisal Ibn Abdul Qaadir Ibn Hassan
Abu Sulaymaan