This was in order to exhibit his own righteousness, because he was forgiving the sins that occurred in the past while God was exercising forbearance; so as to exhibit his own righteousness in this present season, that he might be righteous even when declaring righteous the man that has faith in Jesus.” (Ro 3:23-26)
... The apostle Paul, in particular, showed that, because of the imperfect, sinful state of all mankind, none could be declared righteous through trying to establish their own righteousness by works of the Mosaic Law. (Ro 3:19-24; Ga 3:10-12)