 Khalaf was born in the middle of November 937 to Abu Ja'far Ahmad and Banu, a granddaughter of the second Saffarid amir, Amr ibn al-Layth.Little is known about the first twenty-six years of his life; presumably much of it was spent learning.From 957 or 958 at the latest he was recognized as heir to the throne and his name was included on his father's coins.