Offering a funeral prayer for an absent person in another city is permissible, whether the city is near or far. In such a case those offering funeral prayer should stand facing the qiblah, even if the city where the absentee is located is not in the direction of the qiblah. After making an intention to pray for the absentee, takbirs should be said as they are normally said in funeral prayer over a deceased who is present. This is based on a hadith reported by the group on the authority of Abu Hurairah that the Prophet, peace be upon him, informed people about the death of Negus the day he died, and then took them out to offer funeral prayer for him. There he arranged his Companions in rows and said four takbirs.
Ibn Hazm said: “The funeral prayer for an absentee may be performed by a group of people under an imam. The Prophet, peace be upon him, offered a funeral prayer for Negus, who had died in Ethiopia, with his Companions standing in rows behind him. There is consensus among the Companions regarding this issue, and it should not be overlooked. Abu Hanifah and Malik, however, disagree with this view, but they have no ground for this disagreement.”