1 Samuel 1:9-11

9 Soothly Hannah rose, after that she had eaten and drunk in Shiloh. And the while Eli [the priest] was on his great seat before the doorposts of the house of the Lord,

10 and when she was in bitter sorrow of soul, she prayed the Lord, and wept largely;

11 and she made a vow to the Lord, and said, Lord God of hosts, if thou beholdest, and seest the torment of thy servantess, and if thou hast mind of me, and forgettest not thine handmaid, and givest a son to thy servantess, I shall give him to the Lord all the days of his life, and a razor shall not come upon his head.