The Story of Samuel, peace be upon him, and therein the beginning of the account of David, peace be upon him
He is Samuel—also called Ashmūʾīl son of Bālī, son of ʿAlqamah, son of Ḥām, son of Elihu, son of Tahu, son of Ṣūf, son of ʿAlqamah, son of Māḥith, son of ʿAmūṣā, son of ʿAzaryā.
Maqātil said: He was among the heirs of Aaron.
Mujāhid said: He is Ashmūʾīl son of Hilfaqā, and he carried the lineage no farther than that—Allah knows best.
Al-Suddi narrated, on the authority of Ibn ʿAbbās, Ibn Masʿūd, a number of the Companions, al-Thaʿlabī, and others: When the Amalekites from the land of Gaza and Ashkelon overpowered the Children of Israel—killing many of them and taking a great number of their children captive—prophethood ceased within the tribe of Levi. Only one pregnant woman remained. She continually implored Allah, Exalted is He, to grant her a male child. She then gave birth to a boy and named him Ashmūʾīl, which in Hebrew means “Ishmael,” that is, “Allah has heard my supplication.”
When the boy grew older, she sent him to the sanctuary and entrusted him to a righteous man there so that he might learn from his virtue and worship. Thus he remained under his care. When Samuel reached maturity, he was sleeping one night when a voice came from the direction of the sanctuary. Startled, he awoke, thinking the elder had called him, and asked, “Did you call me?” The elder, not wishing to alarm him, replied, “Yes; go back to sleep.” He lay down again. The call came a second time with the same result, then a third—whereupon Gabriel was the one calling him. Gabriel came to him and said, “Your Lord has sent you to your people.” What followed between him and them is what Allah has related in His Book.
Allah the Exalted says in His Glorious Book:
“Have you not considered the chiefs of the Children of Israel after Moses, when they said to a prophet of theirs, ‘Appoint for us…’”