Then Abraham approached him and asked, “Do you plan to destroy the good people along with the evil ones? What if there are fifty good people in that city? Will you still destroy it? Surely you will save the city for the fifty good people living there. Surely you will not destroy the good people along with the evil ones; then they would be treated the same. You are the judge of all the earth. Won’t you do what is right?”
The Lord said, “If I find fifty good people in the city of Sodom, I will save the whole city because of them.” Then Abraham said, “Though I am only dust and ashes, I have been brave to speak to the Lord. What if there are only forty-five good people in the city? Will you destroy the whole city for the lack of five good people?”
The Lord said, “If I find forty-five there, I will not destroy the city.”
Again Abraham said to him, “If you find only forty good people there, will you destroy the city?”
The Lord said, “If I find forty, I will not destroy it.”
Then Abraham said, “Lord, please don’t be angry with me, but let me ask you this. If you find only thirty good people in the city, will you destroy it?”
He said, “If I find thirty good people there, I will not destroy the city.”
Then Abraham said, “I have been brave to speak to the Lord. But what if there are twenty good people in the city?”
He answered, “If I find twenty there, I will not destroy the city.”
Then Abraham said, “Lord, please don’t be angry with me, but let me bother you this one last time. What if you find ten there?”
He said, “If I find ten there, I will not destroy it.”
When the Lord finished speaking to Abraham, he left, and Abraham returned home.
Genesis 18 : 23 – 33 (New Century Version)
“Here is the first solemn prayer upon record in the Bible; and it is a prayer for the sparing of Sodom.
Abraham prayed earnestly that Sodom might be spared, if but a few righteous persons should be found in it. Come and learn from Abraham what compassion we should feel for sinners, and how earnestly we should pray for them. We see here that the effectual, fervent prayer of a righteous man avails much. Abraham, indeed, failed in his request for the whole place, but Lot was miraculously delivered.
Be encouraged then to expect, by earnest prayer, the blessing of God upon your families, your friends, your neighbourhood. To this end you must not only pray, but you must live like Abraham. He knew the Judge of all the earth would do right. He does not plead that the wicked may be spared for their own sake, or because it would be severe to destroy them, but for the sake of the righteous who might be found among them.
And righteousness only can be made a plea before God. How then did Christ make intercession for transgressors? Not by blaming the Divine law, nor by alleging aught in extenuation or excuse of human guilt; but by pleading HIS OWN obedience unto death.”#
# Taken From Matthew Henry’s Concise Commentary.