The Messenger of Allah (ﷺ) said four rak'ahs in the noon prayer while at Medina, but he…

Sahih Muslim Book 6 Hadith 12

Sahih Muslim #690 a

The Book of Prayer - Travellers 6:12

Anas reported:

The Messenger of Allah (ﷺ) said four rak'ahs in the noon prayer while at Medina, but he offered two rak'ahs in the afternoon prayer at Dhu'l-Hulaifa.

Chapter: The travelers’ prayer and shortening it

Grade: Sahih