"إذا أدرك أحدكم سجدة من صلاة العصر قبل أن تغرب الشمس فليتم صلاته وإذا أدرك سجدة من صلاة الصبح قبل أن تطلع الشمس فليتم صلاته"
The Prophet (peace and blessings be upon him) said:
"When any of you catches one prostration (that is, one rak'ah) of the Asr prayer before the sun sets, he should complete his prayer; and if he catches one prostration of the Fajr prayer before the sun rises, he should complete his prayer."
Hadith Referenceصحیح الجامع الصغیر / حرف الألف / 294