The Messenger of Allah (ﷺ) did not come back from the journey but by day in the forenoon…

Sahih Muslim Book 6 Hadith 89

Sahih Muslim #716

The Book of Prayer - Travellers 6:89

Ka'b b. Malik reported:

The Messenger of Allah (ﷺ) did not come back from the journey but by day in the forenoon, and when he arrived, he went first to the mosque, and having prayed two rak'ahs in it he sat down in it.

Chapter: It is recommended to pray two rak`ah in the masjid for one who has come from a journey, when he first arrives

Grade: Sahih