His friend became an atheist then he died. Can he offer the funeral prayer for him and say du’aa’ for him?
Question

                A friend of mine who died a few days ago was born to a muslim family and raised as a muslim but the last few years he has been a non-muslim, i.e. claiming himself to be an atheist and not believing in our religion at all. We have had verbal fights about this as well. I was wondering if it's ok to pray for him and go to his funeral since his family is having an islamic funeral. Please let me know as soon as possible. Thank you for your advice in advance.
Praise be to Allah.If the matter is as you 
    describe, and your friend became an atheist and did not believe in Islam, 
    and he died in that state, as appears to be the case, then it is not 
    permissible for the one who knew his situation to offer the funeral prayer 
    for him or to say du’aa’ for him, or to wash him or shroud him or bury him 
    in the Muslim graveyard, because Allaah says (interpretation of the 
    meaning):
“It is not (proper) for 
    the Prophet and those who believe to ask Allaah’s forgiveness for the 
    Mushrikoon, even though they be of kin, after it has become clear to them 
    that they are the dwellers of the Fire (because they died in a state of 
    disbelief)”
[al-Tawbah 9:113]
“And never (O Muhammad
    صلى الله عليه وسلم) pray (funeral 
    prayer) for any of them (hypocrites) who dies, nor stand at his grave. 
    Certainly they disbelieved in Allaah and His Messenger, and died while they 
    were Faasiqoon (rebellious, — disobedient to Allaah and His Messenger
    صلى الله عليه وسلم)”
[al-Tawbah 9:84].
Muslim (976) narrated that 
    Abu Hurayrah said: The messenger of Allaah (blessings and peace of Allaah be 
    upon him) said: “I asked my Lord for permission to pray for forgiveness for 
    my mother but He did not give me permission. And I asked Him for permission 
    to visit her grave and He gave me permission.” 
This is evidence that it is 
    not permissible to say du’aa’ for one who died in a state of shirk or kufr. 
See also question number
    7869 and
    7867. 
And Allaah knows best.