Ruling on visiting a sick kaafir and attending his funeral

Question

Can a Muslim visit a sick kaafir and attend his funeral?

Answer

Praise
be to Allaah.

Shaykh al-Islam Ibn Taymiyah was asked about Muslim people
who have Christian neighbours – is it permissible for a Muslim to visit a
Christian if he gets sick, or to attend his funeral if he dies? Is there
any sin on a Muslim who does these things, or not?

He replied:

Praise be to Allaah the Lord of the Worlds. He should not
attend his funeral, but visiting him when he is sick is fine, because this
may serve an interest, namely opening his heart to Islam. But then if he
dies as a kaafir, he will deserve Hell, hence the prayers should not be
offered for him. And Allaah knows best.