The Prophet's SeerahAfter the Ansar pledged allegiance to him at al-Aqabah, Allah permitted the Muslims to migrate to Yathrib. The Prophet ﷺ migrated with Abu Bakr, and they hid in the Cave of Thawr until Allah surrounded them with His protection and saved them from Quraysh. He arrived in Medina, built the masjid, established brotherhood between the Muhajirun and the Ansar, and founded the Islamic state, with which the Hijri calendar began.

