The Book of Judges contains a disturbing story known as the Levite's Concubine, which bears more than a passing resemblance to the story of Lot's daughters in Sodom.
As they were making their hearts merry, behold, the men of the city, base fellows, beset the house round about, beating on the door; and they said to the old man, the master of the house, “Bring out the man who came into your house, that we may know him.” And the man, the master of the house, went out to them and said to them, “No, my brethren, do not act so wickedly; seeing that this man has come into my house, do not do this vile thing. Behold, here are my virgin daughter and his [[the Levite's]concubine; let me bring them out now. Ravish them and do with them what seems good to you; but against this man do not do so vile a thing.” But the men would not listen to him. So the man seized his concubine, and put her out to them; and they knew her, and abused her all night until the morning. (Judges 19:23-24)
The story in Genesis has a happier ending:
Before they lay down, the men of the city, the men of Sodom, both young and old, all the people to the last man, surrounded the house; and they called to Lot, “Where are the men who came to you tonight? Bring them out to us, that we may know them.” Lot went out of the door to the men, shut the door after him, and said, “I beg you, my brothers, do not act so wickedly. Behold, I have two daughters who have not known man; let me bring them out to you, and do to them as you please; only do nothing to these men, for they have come under the shelter of my roof.” But they said, “Stand back!” And they said, “This fellow came to sojourn, and he would play the judge! Now we will deal worse with you than with them.” Then they pressed hard against the man Lot, and drew near to break the door. But the men put forth their hands and brought Lot into the house to them, and shut the door. And they struck with blindness the men who were at the door of the house, both small and great, so that they wearied themselves groping for the door. (Gen. 19:4-11)
Both stories involve travelers who are offered hospitality. Both involve a crowd, maddened with homosexual lust, demanding carnal knowledge of the male traveler/s. Both stories share the plea: "brethren, do not act so wickedly." In both stories the host's virgin daughter is offered as a replacement for the intended victim/s. (In one story it is two daughters; in the other a daughter and the Levite's concubine.) In both stories the mob declines the offer and threatens violence.
The main difference in the two is the ending: In Lot's case, the travelers (who are actually angels) strike the mob blind, and the daughters escape. In Judges, the concubine is forced out the door, where the mob gang-rapes her. She dies the next day from her injuries. The story in Judges is followed by intertribal warfare. In Genesis it is followed by the destruction of Sodom and Gomorrah.
Are these two stories related in the sense that they borrowed from each other? If so which came first? Could it be that Judges was written first, even though it appears later in the biblical text? Or is the similarity of the stories coincidental?