The Qur'an opens Surah Al-Isra with the journey by night from the Sacred Mosque to the Farthest Mosque (17:1). The Prophet ﷺ described the ascension through the heavens in a detailed narration, during which the prayers were made obligatory and reduced to five each day.
During the pilgrimage season, people from Yathrib came to believe. Ubadah ibn as-Samit, who was among their leaders, recorded what they pledged at Aqabah: to worship none but Allah, and not to steal, commit adultery, or kill unjustly. These pledges opened the way to migration.