Is it true that it is only permissible to perform the janazah prayer in absentia when the deceased is overseas?
Waalaikumussalam wrm. wbt.,
Alhamdulillah, praise and thanks to Allah for the countless blessings He has blessed us all with. Blessings and salutations to the Prophet Muhammad PBUH, his wives, his family, companions and all those that follow his teachings to the day of judgement.
The evidence regarding the sanctioning of janazah prayer in absentia is according to a hadith from Abu Hurairah RA:
أَنَّ رَسُولَ اللَّهِ صَلَّى اللهُ عَلَيْهِ وَسَلَّمَ نَعَى النَّجَاشِىَّ فِى الْيَوْمِ الَّذِى مَاتَ فِيهِ، خَرَجَ إِلَى الْمُصَلَّى، فَصَفَّ بِهِمْ وَكَبَّرَ أَرْبَعًا
Messenger of Allah, may Allah bless him and grant him peace, announced the death of an Najashi to everyone on the day that he died, and went out with them to the place of prayer, and then formed them into rows and said "Allah is greater" four times.
Sahih al-Bukhari (1188) and Sahih Muslim (951)
According to the above question, we would like to state that it is permissible to perform the janazah prayer in absentia even if the deceased is not overseas and is near but we are unable to go and attend his janazah prayer because of certain debilitations. Thus, it is permissible for us to perform the janazah prayer in absentia for our family members or friends.
We will cite the opinion of Syeikhul Islam Syeikh Zakariyya al-Ansari who said: It is permissible to perform the janazah prayer in absentia even if the distance is less than two marhalah. (See Asna al-Matalib, 1/322)
We will close with the supplication for those who have passed away from among us:
رَبَّنَا اغْفِرْ لَنَا وَلِإِخْوَانِنَا الَّذِينَ سَبَقُونَا بِالْإِيمَانِ وَلَا تَجْعَلْ فِي قُلُوبِنَا غِلًّا لِّلَّذِينَ آمَنُوا رَبَّنَا إِنَّكَ رَءُوفٌ رَّحِيمٌ
"Our Lord, forgive us and our brothers who preceded us in faith and put not in our hearts [any] resentment toward those who have believed. Our Lord, indeed You are Kind and Merciful."
Surah al-Hasyr (10)