The Hijra was the migration in 622 AD of Muhammad and his followers to Medina, to escape the polytheist persecution that was plotting to kill Muhammad in Mecca.
In Medina he had a secure position and was able to craft the Constitution of Medina in wich he united the arabic tribes, some of wich had already converted to his preachings of Islam, establishing the basis of a multi-religious Islamic state, and at the head of their armies conquered Mecca, establishing the foothold of what would by 750 had become the Umayyad Islamic Caliphate, extending from Spain to India.