He was the son of Hormizd IV (reigned 579–590) and the grandson of Khosrow I (reigned 531–579). Khosrow II was the last king of Iran to have a lengthy reign before the Muslim conquest of Iran, which began five years after his execution. He lost his throne, then recovered it with the help of the Byzantine emperor Maurice, and, a decade later, went on to emulate the feats of the Achaemenids, conquering the rich Roman provinces of the Middle East; much of his reign was spent in wars with the Byzantine Empire and struggling against usurpers such as Bahram Chobin and Vistahm.