Abu Huraira reported God’s Messenger as saying, “If anyone performs a rak'a of the Morning Prayer before sunrise, he has observed the Morning Prayer; and if anyone performs a rak'a of the afternoon prayer before sunset, he has observed the afternoon prayer.”
(Bukhari and Muslim.)