The Knowledge of Hazrat Khizr (as)

Imam as-Sadiq said, “When Musa and al-Khidhr reached the boy playing with other children, al-Khidhr hit him with his hand and he died. When Musa objected to it, al-Khidhr put his hand on the body of that boy and separated his shoulder and showed it to Musa. On it was written: He is a disbeliever and his naturally disposed to disbelief. al-Khidhr said, ‘I killed him because his parents were virtuous. I was afraid he would draw his parents towards disbelief after growing up and that they will fulfill his wish because of their love for him and in this way become infidels.’” Imam said, “The Almighty gave the parents a daughter in lieu of the boy. Seventy Prophets were born in the progeny of that girl. There was a time gap of 700 years between the two orphan boys (for whom al-Khidhr repaired the wall) and their father.” (perhaps several generations had passed-Tr.).

Reference: Hayat Al-Qulub, Vol. 1, Stories of the Prophets