"Then the Lord said, 'The outcry against Sodom and Gomorrah is so great and their sin so grievous that I will go down and see if what they have done is as bad as the outcry that has reached me. If not, I will know.' The men turned away and went toward Sodom, but Abraham remained standing before the Lord." NIV translation
The Lord revealed that He was there to investigate the reports of their sin. As He stayed with Abraham, the two angels turned towards Sodom to check it out. What was this grievous sin that they were there to investigate? As we shall see, it was men having sex with men which was against the design of God and it is where we get the term sodomy.
"Then Abraham approached him and said: 'Will you sweep away the righteous with the wicked? What if there are fifty righteous people in the city? Will you really sweep it away and not spare the place for the sake of the fifty righteous people in it? Far be it from you to do such a thing - to kill the righteous with the wicked, treating the righteous and the wicked alike. Far be it from you! Will not the Judge of all the earth do right?' The Lord said, 'If I find fifty righteous people in the city of Sodom, I will spare the whole place for their sake.'" NIV translation
You can almost feel the desperation as Abraham pleads for his nephew. It is interesting to note that Abraham did not consider Lot to be righteous because he had not been circumcised. He is hoping that Lot will be spared based on the righteousness of others.
"Then Abraham spoke up again: 'Now that I have been so bold as to speak to the Lord, though I am nothing but dust and ashes, what if the number of the righteous is five less than fifty? Will you destroy the whole city because of five people?' 'If I find forty-five there,' he said, 'I will not destroy it.'" NIV translation
Now, Abraham gets clever by pointing out that, if there were five less than the required fifty, God would be destroying the city because of the actions of only five people. We remember that the number five is the number of grace but Abraham did not know of the grace of God through Jesus Christ.
"Once again he spoke to him, 'What if only forty are found there?' He said, 'For the sake of forty, I will not do it.' Then he said, 'may the Lord not be angry, but let me speak. What if only thirty can be found there?' He answered, 'I will not do it if I find thirty there.' Abraham said, 'Now that I have been so bold as to speak to the Lord, what if only twenty can be found there?' He said, 'For the sake of twenty, I will not destroy it.' Then he said, 'May the Lord not be angry, but let me speak just once more. What if only ten can be found there?' He answered, 'For the sake of ten, I will not destroy it.' When the Lord had finished speaking with Abraham, he left, and Abraham returned home." NIV translation
The conversation continued until Abraham stopped asking for forgiveness at ten. Why did Abraham stop at ten and not go all the way down to one righteous man? Abraham must have thought that the city could not be that bad as to not even have ten men with hearts for God. Would the Lord have spared the city for just one righteous man if Abraham had asked? The answer is yes but he knew their hearts were given over to evil. It seems that many look at our world today with the same "it can't possibly be that bad" attitude. The "church" has become comfortable and forgotten that judgment is coming.