Genesis 18:16-33 NKJV
Then the men rose from there and looked toward Sodom, and Abraham went with them to send them on the way. And the LORD said, “Shall I hide from Abraham what I am doing, since Abraham shall surely become a great and mighty nation, and all the nations of the earth shall be blessed in him? For I have known him, in order that he may command his children and his household after him, that they keep the way of the LORD, to do righteousness and justice, that the LORD may bring to Abraham what He has spoken to him.” And the LORD said, “Because the outcry against Sodom and Gomorrah is great, and because their sin is very grave, I will go down now and see whether they have done altogether according to the outcry against it that has come to Me; and if not, I will know.” Then the men turned away from there and went toward Sodom, but Abraham still stood before the LORD. And Abraham came near and said, “Would You also destroy the righteous with the wicked? Suppose there were fifty righteous within the city; would You also destroy the place and not spare it for the fifty righteous that were in it? Far be it from You to do such a thing as this, to slay the righteous with the wicked, so that the righteous should be as the wicked; far be it from You! Shall not the Judge of all the earth do right?” So the LORD said, “If I find in Sodom fifty righteous within the city, then I will spare all the place for their sakes.” Then Abraham answered and said, “Indeed now, I who am but dust and ashes have taken it upon myself to speak to the Lord: Suppose there were five less than the fifty righteous; would You destroy all of the city for lack of five?” So He said, “If I find there forty-five, I will not destroy it.” And he spoke to Him yet again and said, “Suppose there should be forty found there?” So He said, “I will not do it for the sake of forty.” Then he said, “Let not the Lord be angry, and I will speak: Suppose thirty should be found there?” So He said, “I will not do it if I find thirty there.” And he said, “Indeed now, I have taken it upon myself to speak to the Lord: Suppose twenty should be found there?” So He said, “I will not destroy it for the sake of twenty.” Then he said, “Let not the Lord be angry, and I will speak but once more: Suppose ten should be found there?” And He said, “I will not destroy it for the sake of ten.” So the LORD went His way as soon as He had finished speaking with Abraham; and Abraham returned to his place.