And that was counted unto him for righteousness,.... Not for his justifying righteousness before God; for all the works of righteousness done by the best of men cannot justify them before him, much less a single action: but his executing judgment in the manner he did, or slaying the above two persons, was esteemed a righteous action by the Lord himself; who upon it caused the plague to cease, and likewise gave to Phinehas the covenant of an everlasting priesthood, and to his posterity; whereby the action had eternal honour put upon it, and was sufficiently secured from the calumny of men; who might condemn it as a rash action done by a private person, assuming the office of a public magistrate; and as being a cruel one, not giving the criminals time for repentance.
But all this is set aside by the testimony of God himself, approving of it; and so it continues to be esteemed, as it is said it should,unto all generations for evermore: whenever it is spoken of, it is spoken of with commendation, as a righteous action, as expressive of true zeal for the Lord of hosts.