In the Bible, there is the story of Jalpeth's daughter, which is exactly that sort of case.
Sorry, I mean Jephthah.
God didn’t command Jephthah to do that. He did it on his own.