5 Liberty, then, as We have said, belongs only to those who have the gift of reason or intelligence. Considered as to its nature, it is the faculty of choosing means fitted for the end proposed, for he is master of his actions who can choose one thing out of many. Now, since everything chosen as a means is viewed as good or useful, and since good, as such, is the proper object of our desire, it follows that freedom of choice is a property of the will, or, rather, is identical with the will in so far as it has in its action the faculty of choice. But the will cannot proceed to act until it is enlightened by the knowledge possessed by the intellect. In other words, the good wished by the will is necessarily good in so far as it is known by the intellect; and this the more, because in all voluntary acts choice is subsequent to a judgment upon the truth of the good presented, declaring to which good preference should be given. No sensible man can doubt that judgment is an act of reason, not of the will. The end, or object, both of the rational will and of its liberty is that good only which is in conformity with reason.
Source: Libertas (Vatican.va)