So Abraham went back and forth negotiating how many good people had to be found to save the city from destruction. They finally agreed on ten—if Yahweh could find ten good people in the city of Sodom he would not destroy it. After they concluded their negotiations the Lord Yahweh continued his trip down the road, and Abraham returned to his tent.
A few days later two strangers (who were actually messengers from the Lord Yahweh) came to Sodom in the evening. Lot was sitting near the entrance gate of the city. When Lot saw the strangers, he rose to meet them and bowed to them and, following the custom of his day to welcome strangers to his home, said to them, "Please, sirs, come to my house to spend the night and wash your feet, and then you can rise early and go on your way."
The strangers said, "No; we will spend the night in the town square."
But Lot urged them strongly to accept his invitation, so they finally accepted and came with Lot to his house, where Lot made them a feast, and baked unleavened bread, and they ate. Later that night before they went to bed, there was a commotion outside Lot's house and all the men of the city of Sodom, all the men and boys of city, every one of them, surrounded the house. They shouted to Lot, "Where are the men who came to your house tonight? Bring them out to us, so that we may have sex with them."