An advantage of Hijrah to Yathrib is that it gave the prophet the needed peace to practice Islam. Medina was formerly known as Yathrib.