Sunan Ibn Majah
Sunan Ibn Majah 798
حَدَّثَنَا عُثْمَانُ بْنُ أَبِي شَيْبَةَ، حَدَّثَنَا إِسْمَاعِيلُ بْنُ عَيَّاشٍ، عَنْ عُمَارَةَ بْنِ غَزِيَّةَ، عَنْ أَنَسِ بْنِ مَالِكٍ، عَنْ عُمَرَ بْنِ الْخَطَّابِ، عَنِ النَّبِيِّ ـ صلى الله عليه وسلم ـ أَنَّهُ كَانَ يَقُولُ " مَنْ صَلَّى فِي مَسْجِدٍ جَمَاعَةً أَرْبَعِينَ لَيْلَةً لاَ تَفُوتُهُ الرَّكْعَةُ الأُولَى مِنْ صَلاَةِ الْعِشَاءِ كَتَبَ اللَّهُ لَهُ بِهَا عِتْقًا مِنَ النَّارِ " .
Unreviewed translation. All hadiths in this collection are available in five languages. Titles and introductions may remain in Arabic.
'Uthman ibn Abi Shaybah narrated to us: Isma'il ibn 'Ayyash narrated to us, from 'Umarah ibn Ghaziyyah, from Anas ibn Malik, from 'Umar ibn al-Khattab, from the Prophet (peace and blessings be upon him), that he used to say: ‘Whoever prays in congregation in a mosque for forty nights without missing the first rak'ah of the 'Isha prayer will be granted by Allah, through it, release from the Fire.’
Notes and open questions — unreviewed
The source's condition specifies forty nights, congregational prayer in a mosque, and not missing the first rak'ah of 'Isha.