The Messenger of Allah ﷺ set out from Makkah to Al-Madinah, fearing nothing but the Lord of the worlds, and praying two rak'ahs. (Using translation from Nasāʾī 1435)
أَنَّ رَسُولَ اللهِ ﷺ «خَرَجَ مِنْ مَكَّةَ إِلَى الْمَدِينَةِ لَا يَخَافُ إِلَّا رَبَّ الْعَالَمِينَ فَصَلَّى رَكْعَتَيْنِ»