From Pope St. John Paul II’s encyclical Veritatis Splendor (1993):
T he Church’s Pastors, in communion with the Successor of Peter, are close to the faithful in this effort [of discerning answers to the eternal questions of life]; they guide and accompany them by their authoritative teaching, finding ever new ways of speaking with love and mercy not only to believers but to all people of good will. The Second Vatican Council remains an extraordinary witness of this attitude on the part of the Church which, as an “expert in humanity”,5 places herself at the service of every individual and of the whole world.6
The Church knows that the issue of morality is one which deeply touches every person; it involves all people, even those who do not know Christ and his Gospel or God himself. She knows that it is precisely on the path of the moral life that the way of salvation is open to all. The Second Vatican Council clearly recalled this when it stated that “those who without any fault do not know anything about Christ or his Church, yet who search for God with a sincere heart and under the influence of grace, try to put into effect the will of God as known to them through the dictate of conscience . . . can obtain eternal salvation”. The Council added: “Nor does divine Providence deny the helps that are necessary for salvation to those who, through no fault of their own, have not yet attained to the express recognition of God, yet who strive, not without divine grace, to lead an upright life. For whatever goodness and truth is found in them is considered by the Church as a preparation for the Gospel and bestowed by him who enlightens everyone that they may in the end have life”.7
5 Paul VI, Address to the General Assembly of the United Nations (October 4, 1965), 1: Acta Apostolicae Sedis 57 (1965), 878; cf. Encyclical Letter Populorum Progressio (March 26,1967), 13: AAS 59 (1967), 263-264.
6 Cf. Second Vatican Ecumenical Council, Pastoral Constitution on the Church in the Modern World Gaudium et Spes, 16.
7 Dogmatic Constitution on the Church Lumen Gentium, 16.
— Veritatis Splendor 3