And the LORD said, "Shall I hide from Abraham that thing which I do; seeing that Abraham shall surely become a great and mighty nation, and all the nations of the earth shall be blessed in him? For I know him, that he will command his children and his household after him, and they shall keep the way of the LORD, to do justice and judgment; that the LORD may bring upon Abraham that which he hath spoken of him." And the LORD said, "Because the cry of Sodom and Gomorrah is great, and because their sin is very grievous, I will go down now, and see whether they have done altogether according to the cry of it, which is come unto me; and if not, I will know." And the men turned their faces from thence, and went toward Sodom: but Abraham stood yet before the LORD. And Abraham drew near, and said, "Wilt thou also destroy the righteous with the wicked? Peradventure there be fifty righteous within the city: wilt thou also destroy and not spare the place for the fifty righteous that are therein? That be far from thee to do after this manner, to slay the righteous with the wicked: and that the righteous should be as the wicked, that be far from thee: Shall not the Judge of all the earth do right?" And the LORD said, "If I find in Sodom fifty righteous within the city, then I will spare all the place for their sakes."
Genesis 19:17-26 (KJV, emphasis added)."
And there came two angels to Sodom at even. Lot sat in the gate of Sodom, and Lot seeing them rose up to meet them, and he bowed himself with his face toward the ground. And he said, "Behold now, my lords, turn in, I pray you, into your servant's house, and tarry all night, and wash your feet, and ye shall rise up early, and go on your ways." And they said, "Nay; but we will abide in the street all night." And he pressed upon them greatly; and they turned in unto him, and entered into his house; and he made them a feast, and did bake unleavened bread, and they did eat. But before they lay down, the men of the city, even the men of Sodom, compassed the house round, both old and young, all the people from every quarter, And they called unto Lot, and said unto him, "Where are the men which came in to thee this night? Bring them out unto us, that we may know them." And Lot went out at the door unto them, and shut the door after him, And said, "I pray you, brethren, do not so wickedly. Behold now, I have two daughters which have not known man. Let me, I pray you, bring them out unto you, and do ye to them as is good in your eyes. Only unto these men do nothing, for therefore came they under the shadow of my roof." And they said, "Stand back." And they said again, "This one fellow came in to sojourn, and he will needs be a judge. Now will we deal worse with thee, than with them." And they pressed sore upon the man, even Lot, and came near to break the door. But the men put forth their hand, and pulled Lot into the house to them, and shut to the door. And they smote the men that were at the door of the house with blindness, both small and great: so that they wearied themselves to find the door.
Genesis 19:1-10 (KJV, emphasis added)