The ruling on the funeral prayer for the muharib (one who wages war)
If the muharib is a Muslim, his funeral prayer will be performed, and if he is a disbeliever, it will not be performed. This is because Allah, the Exalted, has forbidden supplication and seeking forgiveness only for the disbelievers and polytheists, as it is in the Quran:
وَلَا تُصَلِّ عَلَىٰ أَحَدٍ مِّنْهُم مَّاتَ أَبَدًا ………… فَاسِقُونَ [At-Tawbah: 84]
“And never pray over any one of them (the disbelievers and hypocrites) who dies, and do not stand at his grave. Indeed, they disbelieved in Allah and His Messenger and died while they were disobedient.”
In another verse it says:
مَا كَانَ لِلنَّبِيِّ وَالَّذِينَ آمَنُوا أَن يَسْتَغْفِرُوا لِلْمُشْرِكِينَ وَلَوْ كَانُوا أُولِي قُرْبَىٰ [At-Tawbah: 113]
“It is not permissible for the Prophet and those who believe to seek forgiveness for the polytheists, even if they are close relatives.”