Political authority is founded on the social nature of the human person. Implied in this is the reality that all political authority has God as its author. Political authority is a necessary, positive and an irreplaceable component of civil life. This authority must guarantee an ordered and upright community life that fosters the freedom of individuals and groups, disciplines and orients this freedom, and respects the independence of the individual in order to attain the common good.
Political authority must be guided by moral law. Without such guidance, it loses its dignity. God is the first source and the final end of political authority understood in this way. Cut off from God, political authority ultimately disintegrates for without him the collective moral conscience clouds and skepticism casts doubt on the basic moral law.
Citizens are not obligated in conscience to follow the prescriptions of civil authority if such prescriptions are contrary to the demands of the moral order, to the fundamental rights of persons or to the teachings of the Gospel. It is a grave duty of conscience not to cooperate, not even formally, with civil legislation that is contrary to the Law of God. One also has the right to resist, both passively and actively, such legislation.
For a more detailed discussion of this topic, refer to the Compendium of the Social Doctrine of the Church, nos. 393-401.