Sunan Ibn Majah · Hadith 798
The Book On The Mosques And The Congregations - كتاب المساجد والجماعات
حدثنا عثمان بن أبي شيبة، حدثنا إسماعيل بن عياش، عن عمارة بن غزية، عن أنس بن مالك، عن عمر بن الخطاب، عن النبي صلى الله عليه وسلم أنه كان يقول " من صلى في مسجد جماعة أربعين ليلة لا تفوته الركعة الأولى من صلاة العشاء كتب الله له بها عتقا من النار " .
It was narrated from 'Umar bin Khattab that: The Prophet used to say: "Whoever performs prayer in congregation at the mosque for forty nights, never missing the first Rak'ah of the 'Isha' prayer, Allah will thereby decree for him salvation from the Fire."
Gradings are classical jarḥ-wa-taʿdīl, name-matched to a rijāl index (not individually re-verified).