Once when they were at Shiloh, Hannah went over to the Tabernacle after supper to pray to the LORD. Eli the priest was sitting at his customary place beside the entrance.
References for 1 Samuel 1:9
Hannah was in deep anguish, crying bitterly as she prayed to the LORD.
And she made this vow: "O LORD Almighty, if you will look down upon my sorrow and answer my prayer and give me a son, then I will give him back to you. He will be yours for his entire lifetime, and as a sign that he has been dedicated to the LORD, his hair will never be cut."
References for 1 Samuel 1:11
As she was praying to the LORD, Eli watched her.
Seeing her lips moving but hearing no sound, he thought she had been drinking.
"Must you come here drunk?" he demanded. "Throw away your wine!"
"Oh no, sir!" she replied, "I'm not drunk! But I am very sad, and I was pouring out my heart to the LORD.
Please don't think I am a wicked woman! For I have been praying out of great anguish and sorrow."
"In that case," Eli said, "cheer up! May the God of Israel grant the request you have asked of him."
"Oh, thank you, sir!" she exclaimed. Then she went back and began to eat again, and she was no longer sad.
The entire family got up early the next morning and went to worship the LORD once more. Then they returned home to Ramah. When Elkanah slept with Hannah, the LORD remembered her request,
and in due time she gave birth to a son. She named him Samuel, for she said, "I asked the LORD for him."
References for 1 Samuel 1:20