The Prophet ﷺ commanded his Companions to migrate to Madina, and he remained in Mecca until they all left. After receiving permission from Allah to migrate, the Prophet ﷺ left with his Companion, Sayyiduna Abū Bakr al-Ṣiddīq, while Sayyiduna ‘Alī slept in the Prophet’s bed to divert the enemy’s attention away from the Messenger ﷺ. After leaving Mecca, they hid in the Cave of Thawr. The Quraysh were looking for him and the search party even came to the Cave of Thawr, but Allah ﷻ diverted their sight away from the Prophet and his Companion. Allah ﷻ mentioned this miracle when He said, “When the two of them were in the cave, he said to his Companion, ‘Do not worry, for Allah is certainly with us.’” [Quran 9:40]