30 Then Phinehas stood up and intervened,
and the plague was stayed.
31 And that was counted to him as righteousness
from generation to generation forever.
Some use Psalm 106:30-31 to undermine the idea that Romans 4:5, Gen. 15:6, etc teach Sola Fide.
When Israel took the fateful steps toward idolatry, Phinehas took a violent step to bring Israel back to the way of God. As a result, God made a covenant with his family to give them the priesthood. Similar language is used in connection with the covenant promises given to Abraham (Gen. 15:6) and inherited by the church (Rom. 4:3). However, the sense of the phrase “counted to him as righteousness” is not the same in 106:31 as it is in Gen. 15:6 and Rom. 4:3. In Gen. 15:6 and Rom. 4:3, the righteousness in view is the individual’s right standing before God that secures eternal life. This righteousness is the perfect righteousness of Christ imputed to us by faith in Him alone (Rom. 4:4, 5; 2 Cor. 5:21). Ps. 106 concerns the righteous reward that Phinehas received, namely, a perpetual priesthood (Num. 25:10–13). Phinehas, no less than anyone else, received a right standing before God only through faith. He was not declared righteous before the Lord on the basis of His obedience. But like us, His justifying faith produced the fruit of obedience. We are justified by faith alone, but not by a faith that is alone. Good works follow faith, but they in no way secure for us our righteous standing before the Lord (cf. James 2:14–26 and notes).
Sproul, R. C. (Ed.). (2015). The Reformation Study Bible: English Standard Version (2015 Edition) (p. 958). Orlando, FL: Reformation Trust.
