Book of Genesis 18:20-32.
In those days, the LORD said: “The outcry against Sodom and Gomorrah is so great, and their sin so grave,
that I must go down and see whether or not their actions fully correspond to the cry against them that comes to me. I mean to find out.”
While the two men walked on farther toward Sodom, the LORD remained standing before Abraham.
Then Abraham drew nearer to him and said: “Will you sweep away the innocent with the guilty?
Suppose there were fifty innocent people in the city; would you wipe out the place, rather than spare it for the sake of the fifty innocent people within it?
Far be it from you to do such a thing, to make the innocent die with the guilty, so that the innocent and the guilty would be treated alike! Should not the judge of all the world act with justice?”
The LORD replied, “If I find fifty innocent people in the city of Sodom, I will spare the whole place for their sake.”
Abraham spoke up again: “See how I am presuming to speak to my Lord, though I am but dust and ashes!
What if there are five less than fifty innocent people? Will you destroy the whole city because of those five?” “I will not destroy it,” he answered, “if I find forty-five there.”
But Abraham persisted, saying, “What if only forty are found there?” He replied, “I will forebear doing it for the sake of the forty.”
Then he said, “Let not my Lord grow impatient if I go on. What if only thirty are found there?” He replied, “I will forebear doing it if I can find but thirty there.”
Still he went on, “Since I have thus dared to speak to my Lord, what if there are no more than twenty?” “I will not destroy it,” he answered, “for the sake of the twenty.”
But he still persisted: “Please, let not my Lord grow angry if I speak up this last time. What if there are at least ten there?” “For the sake of those ten,” he replied, “I will not destroy it.”