He fled to the Safavid court in Isfahan after a power struggle arose among him and his brothers. He lived there in exile from 1629 until 1639 studying Persian and Arabic history. In 1644 or 1645 he acceded to the throne, a position he would hold for twenty years.