It is preceded by forgiveness and followed by regeneration. The just God makes the soul just and upholds His just laws. His law is righteous, and the trusting soul being made just is also made righteous by the same act. Both are one. Justification and righteousness come from the same word in the original.
Justification opens the way for the heart's regeneration.
The penitent believer is rightly related to law and justified by it through faith. The law endorses him because he is in Christ. Forgiveness, justification, and regeneration are not identical, but they all take place at the same time. The three are simultaneously received by the same act of faith.