Pope Leo XIII said:
The end, or object, both of the rational will and of its liberty is that good only which is in conformity with reason. Since, however, both these faculties are imperfect, it is possible, as is often seen, that the reason should propose something which is not really good, but which has the appearance of good, and that the will should choose accordingly. For, as the possibility of error, and actual error, are defects of the mind and attest its imperfection, so the pursuit of what has a false appearance of good, though a proof of our freedom, just as a disease is a proof of our vitality, implies defect in human liberty. The will also, simply because of its dependence on the reason, no sooner desires anything contrary thereto than it abuses its freedom of choice and corrupts its very essence. Thus it is that the infinitely perfect God, although supremely free, because of the supremacy of His intellect and of His essential goodness, nevertheless cannot choose evil; neither can the angels and saints, who enjoy the beatific vision. St. Augustine and others urged most admirably against the Pelagians that, if the possibility of deflection from good belonged to the essence or perfection of liberty, then God, Jesus Christ, and the angels and saints, who have not this power, would have no liberty at all, or would have less liberty than man has in his state of pilgrimage and imperfection. This subject is often discussed by the Angelic Doctor in his demonstration that the possibility of sinning is not freedom, but slavery. It will suffice to quote his subtle commentary on the words of our Lord: "Whosoever committeth sin is the slave of sin."3 "Everything," he says, "is that which belongs to it a naturally. When, therefore, it acts through a power outside itself, it does not act of itself, but through another, that is, as a slave. But man is by nature rational. When, therefore, he acts according to reason, he acts of himself and according to his free will; and this is liberty. Whereas, when he sins, he acts in opposition to reason, is moved by another, and is the victim of foreign misapprehensions. Therefore, `Whosoever committeth sin is the slave of sin.' "4 Even the heathen philosophers clearly recognized this truth, especially they who held that the wise man alone is free; and by the term "wise man" was meant, as is well known, the man trained to live in accordance with his nature, that is, in justice and virtue.
Therefore, the nature of human liberty, however it be considered, whether in individuals or in society, whether in those who command or in those who obey, supposes from this most the necessity of obedience to some supreme and eternal law, which is no other than the authority of God, commanding good and forbidding evil. And, so far, the authority of God over men far from diminishing, or even destroying their liberty, protects and perfects it, for the real perfection of all creatures is found in the prosecution and attainment of their respective ends; but the supreme end to which human liberty must aspire is God.