Psalm 106:31 in the King James Version
And that was counted unto him for righteousness unto all generations for evermore.
Context
30 Then Phinehas stood up and executed judgment, so the plague was stopped.
31 That was credited to him for righteousness, for all generations to come.
32 They angered him also at the waters of Meribah, so that Moses was troubled for their sakes;