Sinners are justified (or counted as righteous) before God the moment they begin to trust in the promises of the Gospel with all their heart. Paul used Abraham as an example:
"What then shall we say was gained by Abraham, our forefather according to the flesh? For if Abraham was justified by works, he has something to boast about, but not before God. For what does the Scripture say? 'Abraham believed God, and it was counted to him as righteousness.'" (Rom. 4:1-3, ESV)According to Paul, Abraham wasn't made right with God by his works but by faith. However, James seems to contradict this idea when he said that Abraham was justified by his works. In James 2:21 to 24 we read:
"Was not Abraham our father justified by works when he offered up his son Isaac on the altar? You see that faith was active along with his works, and faith was completed by his works; and the Scripture was fulfilled that says, 'Abraham believed God, and it was counted to him as righteousness'—and he was called a friend of God. You see that a person is justified by works and not by faith alone." (ESV)Here we are confronted with an apparent contradiction of statements between two divinely inspired New Testament writers. Was Abraham justified by works or by faith? How do we reconcile the seeming contradiction? Again, the key is in the respective context of the verses in question.
While both Paul and James use the same Greek word dikaioō (G1344) for "justified," they don't however make the same application of the word because they don't address the same subject matter (see the illustration below). Paul is discussing how a sinner is declared righteous before God through faith alone (Rom. 3:20). James, on the other hand, talks about how believers are shown to be righteous in the sight of other people by what they do. This is very evident in verse 18:
"But someone will say, 'You have faith; I have deeds.' Show me your faith without deeds, and I WILL SHOW YOU my faith by my deeds." (Jm. 2:18, 24, NIV)Notice the "your" and "you" in the verse. James is not saying he will show God his faith by his deeds. Rather, James will show his faith to other people who cannot see through the heart of another (see also Mat. 5:16). There is no need for God to look over our deeds for Him to determine whether we have faith or not. He looks directly at the heart (1 Sam. 16:7, cf. 2 Chr. 6:30). This is why Paul says in Rom. 4:1-3 that if Abraham was justified by works, he has something to boast about, but NOT BEFORE GOD.
When God saw Abraham's wholehearted trust in Him, He considered him as righteous in His sight right then and there (Rom. 4:1-3). Then prompted by his faith, Abraham obeyed the Lord as an outward confirmation that he was really made right with God through faith (Jm. 2:21-24). Here we see the teachings of Paul and James perfectly in harmony with each other. Paul is looking at the root of our salvation, while James is looking at the fruit of our salvation.
James 2:14-24 is just one of the many passages in the Word of God detractors of the Evangelical faith are quick to take out of context in their desire to disprove the God-glorifying, biblical doctrine of Sola Fide. James is not saying here that we can earn our way to heaven by our works. No. Salvation is by grace alone, that is: "it is no longer on the basis of works; otherwise grace would no longer be grace" (Rom. 11:6, ESV).
True, James is concerned with the importance of good works, NOT as means to attain Salvation, but as necessary evidence of our saving faith in Christ to the glory of God who saved us gratuitously (cf. Mat. 5:14-16; Eph. 2:10).
Saving faith (Eph 1:11-14), the kind that results in following Christ’s example, comes from God (Phil 1:29; 2 Pet 1:1; John 6:44). If we have true, saving faith then we are heaven-bound (Heb 10:19-22; John 5:24; John 6:37; John 10:27-28; Rom 8:38-39). Whatever works come after that, whatever commands are followed, are because of a transformed heart (Deut. 30:6; Eze. 36:26-27; Eph 3:17), a new creation (2 Cor 5:17), and a spirit-filled life (Romans 8:9) all of which are indicative of the saving faith, not a contribution towards it (Eph 2:10; Phil 1:6; Phil 2:13).
To God be the Glory!