Hadith
أَخْبَرَنَا عَمْرُو بْنُ مَنْصُورٍ، قَالَ حَدَّثَنَا الْفَضْلُ بْنُ دُكَيْنٍ، قَالَ حَدَّثَنَا شَيْبَانُ، عَنْ يَحْيَى، عَنْ أَبِي سَلَمَةَ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ صلى الله عليه وسلم قَالَ " إِذَا أَدْرَكَ أَحَدُكُمْ أَوَّلَ سَجْدَةٍ مِنْ صَلاَةِ الْعَصْرِ قَبْلَ أَنْ تَغْرُبَ الشَّمْسُ فَلْيُتِمَّ صَلاَتَهُ وَإِذَا أَدْرَكَ أَوَّلَ سَجْدَةٍ مِنْ صَلاَةِ الصُّبْحِ قَبْلَ أَنْ تَطْلُعَ الشَّمْسُ فَلْيُتِمَّ صَلاَتَهُ " .
It was narrated from Abu Hurairah that the Prophet (ﷺ) said:"If any one of you catches the first prostration of 'Asr prayer before the sun sets, let him complete his prayer, and if he catches up with the first prostration of Fajr prayer before the sub rises, let him complete his prayer
Sahih · Abu Ghuddah
Sunan an-Nasa'i 516 ·Book 6, Hadith 23·Also available on sunnah.com·