Yahya bin Yazid Hinai reported,

I asked Anas bin Malik about shortening the prayer, and he said, "Whenever the Messenger of Allah ﷺ travelled a distance of three miles or three farsakhs," — Shuba was the one uncertain about which — "he would pray two rakahs."

Azami 2869

Sahih

عن يحيى بن يزيد الهنائي قال

سألت أنس بن مالك: عن قصر الصلاة فقال: كان رسول الله ﷺ إذا خرج مسيرة ثلاثة أميال، أو ثلاثة فراسخ- شعبة الشاك- صلى ركعتين.

الأعظمي 2869صحيح
Contents
Reference
Commentary
Ayat
Collection
Jami al-Kamil
Book
Prayer
Chapter
Witr prayer
Section
From where the traveler begins to shorten the prayer
Numbering
Jami al-Kamil 2869 (2nd edition)
Azami 2869