"And the Lord said unto Noah, Come thou and all thy house into the ark; for thee have I seen righteous before me in this generation" (Genesis 7:1).
This is the first mention of the great doctrine of justification in the Bible--that is, being seen as "righteous" by God. The same Hebrew word is translated "just" in Genesis 6:9: "Noah was a just man." The reason Noah was seen as righteous and therefore as just, or justified before God, was that "Noah found grace in the eyes of the Lord" (Genesis 6:8). This is the first mention of "grace" in the Bible. The first mention of "faith" or "belief" is also associated with justification: "|Abraham| believed in the Lord; and He counted it to him for righteousness" (Genesis 15:6).
Thus, in the Old Testament and certainly in the New, justification is by grace through faith. "Being justified freely by His grace through the redemption that is in Christ Jesus" and also "being justified by faith, we have peace with God through our Lord Jesus Christ" (Romans 3:24; 5:1).
Justification--that is, being seen and proclaimed as perfectly righteous, even in spite of past sins--must of course be authorized by God the Creator. "It is God that justifieth" (Romans 8:33). That God can indeed be both "just, and the justifier of him which believeth in Jesus" (Romans 3:26) is based entirely on the substitutionary death and bodily resurrection of Christ who conquered death. "Being now justified by His blood," the Lord Jesus Christ "was delivered for our offenses, and was raised again for our justification" (Romans 5:9; 4:25).
Now, although we are freely justified by grace through faith, such justification inevitably generates good works also, for "by works a man is justified, and not by faith only" (James 2:24). HMM