Judges - Chapter 11
Yiftach Messes Up - Part I
Yiftach (Jephthah in English) was a great warrior, but he had a different mother than his siblings. (She was possibly a prostitute, a concubine, or simply a woman from another Tribe - the commentators offer a variety of opinions.) His brothers expelled him so that he would not inherit with them. But when Israel went to war against Ammon, they summoned him back. Yiftach initially refused, but he then agreed to lead the forces of Israel against Ammon on the condition that they make him their leader, not just their general.
Yiftach sent messengers to the king of Ammon asking what their grievance was. The crux of the matter was land that Israel supposedly took from Ammon when they left Egypt. Yiftach pointed out some history - including that there were 300 intervening years in which Ammon could have made such a claim but didn't. Since Ammon's point of view could not be reconciled with Israel's, war was inevitable. (Does any of this sound familiar today?)
Yiftach made a vow to G-d that if he were successful in battle, he would offer as a sacrifice the first thing that greeted him upon his return. This was greatly lacking in judgment as Yiftach was successful in battle against Ammon and upon his return was greeted by his daughter. She agreed that it was important for Yiftach to keep his word and her friends gathered to bemoan her fate, which became an annual practice.
It's important to note that nowhere does it say that Yiftach actually sacrificed his daughter. Human sacrifice is one of the most reprehensible things to G-d. It appears that Yiftach did not actually offer up his daughter, but that she became sanctified and never married. (Her friends specifically bemoaned "her virginity.") In either case, Yiftach is criticized for not seeking to have the vow annulled.