29 Then the Spirit of the Lord was upon Jephthah, and he passed through Gilead and Manasseh and passed on to Mizpah of Gilead, and from Mizpah of Gilead he passed on to the Ammonites. 30 And Jephthah made a vow to the Lord and said, “If you will give the Ammonites into my hand, 31 then whatever  comes out from the doors of my house to meet me when I return in peace from the Ammonites shall be the Lord's, and I will offer it  up for a burnt offering.” 32 So Jephthah crossed over to the Ammonites to fight against them, and the Lord gave them into his hand. 33 And he struck them from Aroer to the neighborhood of Minnith, twenty cities, and as far as Abel-keramim, with a great blow. So the Ammonites were subdued before the people of Israel.
34 Then Jephthah came to his home at Mizpah. And behold, his daughter came out to meet him with tambourines and with dances. She was his only child; besides her he had neither son nor daughter. 35 And as soon as he saw her, he tore his clothes and said, “Alas, my daughter! You have brought me very low, and you have become the cause of great trouble to me. For I have opened my mouth to the Lord, and I cannot take back my vow.” 36 And she said to him, “My father, you have opened your mouth to the Lord; do to me according to what has gone out of your mouth, now that the Lord has avenged you on your enemies, on the Ammonites.” 37 So she said to her father, “Let this thing be done for me: leave me alone two months, that I may go up and down on the mountains and weep for my virginity, I and my companions.” 38 So he said, “Go.” Then he sent her away for two months, and she departed, she and her companions, and wept for her virginity on the mountains. 39 And at the end of two months, she returned to her father, who did with her according to his vow that he had made. She had never known a man, and it became a custom in Israel 40 that the daughters of Israel went year by year to lament the daughter of Jephthah the Gileadite four days in the year. (ESV)