Genesis 18:22-26
18:22 The two men turned and headed toward Sodom, but Abraham was still standing before the Lord.
18:23 Abraham approached and said, “Will you sweep away the godly along with the wicked?
18:24 What if there are fifty godly people in the city? Will you really wipe it out and not spare the place for the sake of the fifty godly people who are in it?
18:25 Far be it from you to do such a thing – to kill the godly with the wicked, treating the godly and the wicked alike! Far be it from you! Will not the judge of the whole earth do what is right?”
18:26 So the Lord replied, “If I find in the city of Sodom fifty godly people, I will spare the whole place for their sake.”