The Messenger of Allah ﷺ forbade praying after the afternoon prayer until the sun sets, and praying after the dawn prayer until the sun rises.
نهى رسول الله ﷺ عن الصلاة بعد العصر حتى تغرب الشمس، وعن الصلاة بعد الصبح حتى تطلع الشمس.
Malik narrated it in Quran (48), from Muhammad bin Yahya bin Habban, from Araj, from Abu Hurairah, and he mentioned it.Muslim narrated it in Prayer of the Traveler (825), from Yahya bin Yahya, who said, "I read to Malik," from Muhammad bin Yahya bin Habban with it, similarly.Bukhari narrated it in Prayer Times (588), from Muhammad bin Salam, who said, Abdah narrated to us, from Ubaydullah, from Habib, from Hafs bin Asim, from Abu Hurairah, who said, "The Messenger of Allah ﷺ forbade two prayers, after Fajr until the sun rises, and after Asr until the sun sets," just as he also narrated it in other places within a long hadith. Each part will be mentioned in its proper place.