The Prophet ﷺ traveled from Medina to Mecca fearing none but Allah, Lord of the worlds, and he prayed two rakahs.
حدثنا قتيبة حدثنا هشيم عن منصور بن زاذان عن ابن سيرين
أن النبي ﷺ خرج من المدينة إلى مكة لا يخاف إلا الله رب العالمين فصلى ركعتين
Sahih. Reference: [Sahih]. Nasai also reported it, 3/117, no. 1436 (Shortening the prayer while traveling, chapter 1), from Qutayba through the same route, and it has supporting narrations reported by Nasai, no. 1437 and elsewhere.