The Messenger of Allah ﷺ was on his journey. They (the people) slept abandoning the Fajr prayer. They awoke by the heat of the sun. Then they travelled a little until the sun rose high. He (the Prophet) commanded the mu'adhdhin (one who called for prayer) to call for prayer. He then offered two rak'ahs of prayer (sunnah prayer) before the (obligatory) fajr prayer. Then he (the mu'adhdhin) announced for saying the prayer in congregation (i.e. he uttered iqamah). Then he led them in the morning prayer.
أَنَّ رَسُولَ اللَّهِ ﷺ كَانَ فِي مَسِيرٍ لَهُ فَنَامُوا عَنْ صَلاَةِ الْفَجْرِ فَاسْتَيْقَظُوا بِحَرِّ الشَّمْسِ فَارْتَفَعُوا قَلِيلاً حَتَّى اسْتَقَلَّتِ الشَّمْسُ ثُمَّ أَمَرَ مُؤَذِّنًا فَأَذَّنَ فَصَلَّى رَكْعَتَيْنِ قَبْلَ الْفَجْرِ ثُمَّ أَقَامَ ثُمَّ صَلَّى الْفَجْرَ