Sayyiduna Sahl bin Sa’d (may Allah be pleased with him) narrates that the Prophet Muhammad (peace and blessings be upon him) said: “There are two moments in which the gates of the heavens are opened: at the time of attending the prayer, and at the time of forming ranks in the path of Allah (while engaging in jihad).”
Hadith Referenceصحیح ابن حبان / كتاب الصلاة / 1720
Hadith Gradingفضيلة الشيخ الإمام محمد ناصر الدين الألبانيصحيح - «التعليق الرغيب» (1/ 114 و 115 - 116).فضيلة الشيخ العلّامة شُعيب الأرناؤوطإسناده صحيح، لكن اختلف في رفعه ووقفه، أبو حازم: هو سلمة بن دينار الأعرج التمار المدني القاص.