Prophet's miraculous journey to Madinah
There were two miracles that happened when Prophet Muhammad ﷺ was emigrating along with his companion Abu Bakr (r.a) from Makkah to Madinah. Both of these carry great significance as they show how divine protection assisted the Prophet ﷺ against his enemies on a very crucial point of his prophetic mission. Muslim community was now going to live in a town where they would be able to freely practice their faith. Had the Prophet failed in this travel, and killed on his way, it could have been a whole different story for Islam. Another important thing to note is that this moment was associated with the first year of the Islamic calendar called Hijri Calendar (also lunar calendar). The emigration to Madinah is known as hijrah (emigration) from where the term hijri for Islamic calendar comes.
When Allah's Messenger ﷺ, together with Abu Bakr (r.a), took shelter in the cave of Saur in order to be safe from the unbelievers who were in pursuit of them, two pigeons build a nest and lay eggs in it at the entrance, and a spider covered the entrance of the cave with a thick web. As Ubayy bin Khalaf, one of the heads of the Quraish who was later killed by the Prophet ﷺ in the battle of Badar, was examining the cave, his friends suggested that they should enter, but he replied: “This web seems to have been spun before Muhammad was born, and the is pigeon with a nest and eggs. Would they still be there if someone were in the cave?” Thus Allah ﷻ confused their plot and they left. Allah ﷻ reminds us in the Quran of His protection for the Prophet ﷺ when He says: “God helped him at the time when those who were bent on denying the truth drove him away, [and he was but] one of two: when these two were [hiding] in the cave, [and] the Messenger said to his companion, ‘Grieve not: verily, God is with us.’” Abu Bakr (r.a) said “I said to the Prophet while I was in the Cave. ‘If any of them should look under his feet, he would see us.’ He said, ‘O Abu Bakr! What do you think of two (persons) the third of whom is Allah?’” This worry of Abu Bakr (r.a) that Quran and hadith mentions was not for himself but for the danger that the Prophet ﷺ might be exposed to.
The dangers they were exposed to do not end here. As they left the cave and headed to Madinah, the heads of Quraish sent a man named Suraqa to assassinate them, paying him a considerable amount of money. When Suraqa was finally able to catch them, the Prophet ﷺ cast a glance at Suraqa, and his horse sunk in the sand up to his belly. Seeing that he realized that he could not harm the Prophet ﷺ due to Allah’s protection, he then asked for the Prophet ﷺ for forgiveness and blessings. The Prophet ﷺ freed him on the condition that when he returns to Makkah he will not tell anyone of their whereabouts, to which he agreed. Another certain event during this journey is when a shepherd saw the Prophet ﷺ and Abu Bakr (r.a), he immediately went to Makkah in order to inform the Quraish, but when he arrived there he forgot what he had come for. He tried hard to think what he was intending to but could not remember his intention, so he had to turn back. He later realized that he had been made to forget.
 Nursi 2010
 Al Quran 9:40
 Sahih al-Bukhari 3653 – Sunnah.com
 Sahih al-Bukhari 3615
 Nursi 2010