The following excerpt is taken from Luther's commentary on the book of Galatians regarding chapter 4 verse 30.
[which can be accessed HERE at pages 368-369 within the scanned book]
And now they themselves do not defend their wicked life; nay, rather, they which are the best and the soundest of them all, do detest it; but they fight for the maintenance and defence of the doctrine of devils, for hypocrisy, and for the righteousness of works. Here they allege the authority of councils and the examples of holy fathers, whom they affirm to have been the authors of their holy orders and statutes. Therefore, we fight not against the manifest wickedness and abominations of the papacy, but against the greatest holiness and holiest saints thereof, which think they lead an angelic life, whilst they dream that they keep not only the commandments of God, but also the counsels of Christ, and do works of supererogation, and such as they are not bound to do. This, we say, is to labour in vain, except they take hold of that only and alone, which Christ saith is only necessary, and choose the good part with Mary, which shall not be taken from them.
This did Bernard, a man so godly, so holy, and so chaste, that he is to be commended and preferred above them all. He being once grievously sick, and having no hope of life, put not his trust in his single life, wherein he had lived most chastely; not in his good works and deeds of charity, whereof he had done many; but removed them far out of his sight, and, receiving the benefit of Christ by faith, he said: "I have lived wickedly. But thou, Lord Jesus Christ, by double right dost possess the kingdom of heaven: first, because thou art the Son of God; secondly, because thou hast purchased it by thy death and passion. The first thou keepest for thyself, by thy birth-right. The second thou givest to me, not by the right of my works, but by the right of of grace." He set not against the wrath of God his monkery, nor his angelic life; but he took hold of that one thing which was necessary, and so was saved. I think that Hierome, Gregory, and many other of the fathers, were saved after the same sort. And it is not to be doubted but that also, in the Old Testament, many kings of Israel and other idolaters were saved in like manner, who, at the hour of death, casting away their vain trust which they had in idols, took hold of the promise of God, which was made unto the seed of Abraham, that is to say, Christ, in whom all nations should be blessed. And if there be any of the papists which shall be saved, they must simply lean not to their own good deeds and deserts, but to the mercy of God offered unto us in Christ, and say with Paul: "I have not mine own righteousness which is of the law, but that which is by faith in Christ," (Phil. iii. 9.)