It is narrated from Sayyiduna Abu Hurairah, may Allah be pleased with him, that the Messenger of Allah, peace and blessings be upon him, said: “Whoever catches one rak‘ah of the Fajr prayer before the sun rises, he has attained the (reward of) Fajr prayer (in congregation), and whoever catches one rak‘ah of the ‘Asr prayer before the sun sets, he has attained the (reward of) ‘Asr prayer (in congregation).”
Hadith Referenceسنن دارمي / من كتاب الصللاة / 1256
Hadith Takhrijاس روایت کی سند صحیح اور حدیث متفق علیہ ہے۔ دیکھئے: [بخاري 579] ، [مسلم 608] ، [ابن حبان 1484]
Brief Explanation
(Commentary on Ahadith 1253 to 1256)
The meaning of these ahadith is: If, due to a valid Shar‘i excuse, someone is delayed in joining the prayer and manages to catch even one rak‘ah, then Allah Ta‘ala, out of His grace and mercy, grants him the reward of having performed the entire congregational prayer. And after having caught one rak‘ah, without any hesitation, he should complete the remainder of the prayer.