We are introduced to Hannah the Prophetess in the opening verses of I Samuel. Hannah was childless. Like Jacob of old, her husband, Elkanah, had a second wife, who bore him both sons and daughters, and who went out of her way to remind Hannah of this fact. It is clearly shown that Hannah came first in her husband's affections, and while indeed he claimed to show more kindness to her "than ten sons" (verse 8), even this was not enough, she felt, to compensate for the absence of the child she so earnestly desired.
After some time she approached "the temple of the Lord" in Shiloh, and there "in bitterness of soul" she importuned God in silent prayer, vowing that if a son were indeed born to her in response to her petitions, she would gladly dedicate him to God's service. Observing that, while her lips moved under stress of her emotion, she uttered no spoken word, Eli the priest suspected her of intoxication, but on being assured alike of her earnestness and her sobriety, he said to her (verse 17), "Go in peace: and the God of Israel grant thee thy petition that thou hast asked of him." In due course she did indeed give birth to a son, whom she named Samuel.
Hannah kept the boy with her until he was weaned—that would be from two to three years, according to Hebrew custom. Then, in fulfillment of her vow, she brought him to Eli to be trained in the service of the sanctuary. She had proved for herself the efficacy of sincere, prayerful desire, and now her prayer is more akin to a song of gratitude, which has been justly described as "in the highest order of prophetic poetry" (Young's Concordance) . This important passage is found in the second chapter of I Samuel.