And he believed in Jehovah, and He imputed it to him for righteousness. (Genesis 15:6)
That this signifies that herein the Lord first became righteousness, may also be seen from the connection of things in the internal sense, in which the Lord is treated of. That the Lord alone became righteousness for the whole human race, may be seen from the fact that He alone fought from Divine love, namely, from love toward the whole human race, whose salvation was what in His combats He solely desired and burned for. In regard to His Human Essence the Lord was not born righteousness, but became righteousness through combats of temptations and victories, and this from His own power. As often as He fought and overcame, this was imputed to Him for righteousness, that is, it was added to the righteousness that He was becoming, as a continual increase, until He became pure righteousness.
A man who is born of a human father, or of the seed of a human father, when fighting from himself cannot fight from any other love than the love of self and of the world, thus not from heavenly love, but from infernal love, for such is the character of his Own [self-hood] from his father, in addition to the Own [self-hood] acquired by his own conduct. Therefore he who supposes that he fights from himself against the devil is hugely mistaken. In like manner he who desires to make himself righteous by his own powers – that is, to believe that the goods of charity and the truths of faith are from himself, consequently that he merits heaven by them – acts and thinks against the good and truth of faith; for it is a truth of faith, that is, it is the truth itself, that the Lord fights. And therefore because he then acts and thinks against the truth of faith, he takes away from the Lord what is His, and makes what is the Lord’s to be his own, or what is the same, he puts himself in the Lord’s place, and thereby puts that which is infernal in himself. Hence it is that such men desire to become great, or the greatest, in heaven; and hence it is that they falsely believe that the Lord fought against the hells in order that He might be the greatest. What is man’s own [self-hood] is attended with such phantasies,, which appear as if they were truths, but are just the reverse.
That the Lord came into the world in order to become righteousness, and that He alone is righteousness, was also foretold by the prophets; and therefore this could have been known before His coming; and also that He could not become righteousness except through temptations, and victories over all evils and all the hells.
As in Jeremiah:
In His days Judah shall be saved, and Israel shall dwell in confidence, and this is His name whereby they shall call Him, Jehovah our righteousness (Jer. 23:6).
In the same:
In those days and in that time will I cause an Offshoot of righteousness to grow onto David, and He shall do judgment and righteousness in the land. In those days shall Judah be saved, and Jerusalem shall dwell in confidence; and this is what they shall call Him, Jehovah our righteousness (Jer. 33:15-16).
He saw, and there was no man; and He wondered that there was none to intercede; and His arm brought salvation unto Him, and His righteousness it upheld Him. And He put on righteousness as a coat of mail, and a helmet of salvation upon His head (Isa. 59:16-17; see especially Isa. 63:3, 5).
“His arm” means His own power. Because the Lord alone is righteousness, the “habitation of righteousness” also is mentioned in Jeremiah 31:23; 50:7.