Rom 3:9b-12
For we have already charged that all, both Jews and Greeks, are under sin, as it is written:
"None is righteous, no, not one;
no one understands;
no one seeks for God.
All have turned aside; together they have become worthless;
no one does good,
not even one."
How, then, could anyone be called righteous?
I already discussed a little of what I believe about this. Were OT saints saved? Yes, by faith. And it was by the same means that they were declared righteous--they believed in the promises and ability of God, which ultimately was belief in the Lamb which was slain "before the foundation of the world" (Rev 13:8).
Faith was credited to them as righteousness. That means they really weren't righteous in and of themselves, but their faith in and obedience to God (obedience is demonstrated faith) was acceptable to God and therefore was granted to them as righteousness--I think of it almost as 'righteousness on loan.' They didn't know God was going to slay His Son for them, but they believed and obeyed God, and thus had a part in the tapestry of salvation that He used them to weave.
Rom 4:3-7
What does the Scripture say? 'Abraham believed God, and it was credited to him as righteousness.' Now when a man works, his wages are not credited to him as a gift, but as an obligation. However, to the man who does not work but trusts God who justifies the wicked, his faith is credited as righteousness. David says the same thing when he speaks of the blessedness of the man to whom God credits righteousness apart from works: 'Blessed are they whose transgressions are forgiven, whose sins are covered. Blessed is the man whose sin the Lord will never count against him.'
This reasoning, then, did not just apply to Abraham, but to other people who believed God and did what He asked.
NOAH
Gen 6:9b
Noah was a righteous man, blameless in his generation.
2 Pet 2:5
And God did not spare the ancient world--except for Noah and his family of seven. Noah warned the world of God's righteous judgment.
Gen 7:1
The LORD then said to Noah, 'Go into the ark, you and your whole family, because I have found you righteous in this generation.'
JOB
Notice what Job did--it's not that he never sinned, but rather that He trusted God and did what God required in order to atone for sin. Job's habits speak volumes about his heart before the Lord:
Job 1:1, 4-5
There was a man in the land of Uz whose name was Job, and that man was blameless and upright, one who feared God and turned away from evil....His sons used to go and hold a feast in the house of each one on his day, and they would send and invite their three sisters to eat and drink with them. And when the days of the feast had run their course, Job would send and consecrate them, and he would rise early in the morning and offer burnt offerings according to the number of them all. For Job said, "It may be that my children have sinned, and cursed God in their hearts." Thus Job did continually.
James 5:11
Behold, we consider those blessed who remained steadfast. You have heard of the steadfastness of Job, and you have seen the purpose of the Lord, how the Lord is compassionate and merciful.
LOT
Back to 2 Peter 2--
2 Pet 2:4, 6-9
4For if God did not spare angels when they sinned, but sent them to hell, putting them into gloomy dungeons to be held for judgment...if he condemned the cities of Sodom and Gomorrah by burning them to ashes, and made them an example of what is going to happen to the ungodly; and if he rescued Lot, a righteous man, who was distressed by the filthy lives of lawless men (for that righteous man, living among them day after day, was tormented in his righteous soul by the lawless deeds he saw and heard)--if this is so, then the Lord knows how to rescue godly men from trials and to hold the unrighteous for the day of judgment, while continuing their punishment.
Each of these men was righteous because of faith. Faith is defined for us in Hebrews as "the assurance of things hoped for, the conviction of things not seen. For by it the people of old received their commendation" (1:1). They were convinced of that which they did not see and Him in whom they hoped.
Righteousness and faith in God and the promises of the Messiah are inseparable. One is never righteous by deeds, no matter how well he keeps the commandments of the Law. There will be some failure, in heart or by commission, and death is the harvest. What is our own righteousness before a holy God?
Isa 64:5
You come to the help of those who gladly do right,
who remember your ways.
But when we continued to sin against them,
you were angry.
How then can we be saved?
All of us have become like one who is unclean,
and all our righteous acts are like filthy rags.
Like those in the OT, we are only righteous through faith--and now we know Him whom the prophets longed to know about. He is our hope and the worthy Lamb, slain to redeem all that credited righteousness--to pay the debt owed by them and whosoever will come to Him, to atone once for all in a way that no animal could do. At some point, anything received on credit has to be paid for.
Matthew 13:16-17
But blessed are your eyes, for they see, and your ears, for they hear. Truly, I say to you, many prophets and righteous people longed to see what you see, and did not see it, and to hear what you hear, and did not hear it.
John 17:3-4
And this is eternal life, that they know you the only true God, and Jesus Christ whom you have sent. I glorified you on earth, having accomplished the work that you gave me to do.
John 19:30b
He said, "It is finished," and he bowed his head and gave up his spirit.
Rom 1:16-17
For I am not ashamed of the gospel, for it is the power of God for salvation to everyone who believes, to the Jew first and also to the Greek. For in it the righteousness of God is revealed from faith for faith, as it is written, "The righteous shall live by faith."
Rom 3:20-24
Therefore no one will be declared righteous in his sight by observing the law; rather, through the law we become conscious of sin.
But now a righteousness from God, apart from law, has been made known, to which the Law and the Prophets testify. This righteousness from God comes through faith in Jesus Christ to all who believe. There is no difference, for all have sinned and fall short of the glory of God, and are justified freely by his grace through the redemption that came by Christ Jesus.
I am no trained theologian--I know my words are but a pitiful attempt to meditate on so great a thing. But I am amazed at the mercy and work of God on our behalf. I am thankful that He is a God who credited faith as righteousness, and allowed the Son to be bruised for our iniquities.