Immortale Dei

Immortale Dei written in 1885 is one of five encyclicals of Pope Leo XIII on Church-State relations.
Context.
The encyclical "Immortale Dei" of Pope Leo XIII, Concerning the Christian Constitution of States ("De Civitatum Constitutione Christiana"), was issued November 1, 1885, during the time of the "Kulturkampf" in Germany, and the laicizing of schools in France. It is a reaffirmation of ecclesiastical rights in which Leo deplored what he saw as a modern tendency to install in society the supremacy of man to the exclusion of God. He believed social contract theories dangerous, as fostering authoritarianism.
According to Michael L. Brock, the Church's position has always been that there exist two orders, the supernatural and the natural, that in the latter the governing body has (or is delegated) priority and in the former the Church has priority, and that governments are natural institutions which should be respected. "To despise legitimate authority, in whomsoever vested, is unlawful, as a rebellion against the divine will, and whoever resists that, rushes willfully to destruction," (...) however, "To wish the Church to be subject to the civil power in the exercise of her duty is a great folly and a sheer injustice. Whenever this is the case, order is disturbed, for things natural are put above things supernatural...
It is the Church, and not the State, that is to be man's guide to heaven. ... It is to the Church that God has assigned the charge of ... administering freely and without hindrance, in accordance with her own judgment, all matters that fall within its competence.
Content.
Leo bases his philosophy of society on Aquinas's theory of natural law. Leo had promoted the study of scholastic philosophy in his earlier encyclical "Aeterni Patris" in 1879.
He rejects the claim that the Church is opposed to the rightful aims of the civil government.
Man's natural instinct moves him to live in civil society, for he cannot, if dwelling apart, provide himself with the necessary requirements of life, nor procure the means of developing his mental and moral faculties. Hence it is divinely ordained that he should lead his life, be it family, social, or civil, with his fellow-men, amongst whom alone his several wants can be adequately supplied. But as no society can hold together unless someone be over all, directing all to strive earnestly for the common good, every civilized community must have a ruling authority, and this authority, no less than society itself, has its source in nature, and has consequently God for its author.
Therefore, all authority ultimately derives from God.
Leo alienated both the monarchists and the followers of Lamennais in declining to specify what form government should take. "The right to rule is not necessarily bound up with any special mode of government. It may take this or that form, provided only that it be of a nature to ensure the general welfare. But whatever be the nature of the government, rulers must ever bear in mind that God is the paramount ruler of the world and must set Him before themselves as their exemplar and law in the administration of the State."
"Nature and reason, which command every individual devoutly to worship God in holiness, because we belong to Him and must return to Him since from Him we came, bind also the civil community by a like law. ... So, too, is it a sin in the State not to have care for religion, as a something beyond its scope, or as of no practical benefit ... All who rule, therefore, should hold in honour the holy name of God, and one of their chief duties must be to favour religion, to protect it, to shield it under the credit and sanction of the laws, and neither to organize nor enact any measures that may compromise its safety."
Leo made it quite clear that he opposed liberty of thought and liberty of the press: "So, too, the liberty of thinking, and of publishing, whatsoever each one likes, without any hindrance, is not in itself an advantage over which society can wisely rejoice. On the contrary, it is the fountain-head and origin of many evils."
Relation between both powers.
The Almighty, therefore, has appointed the charge of the human race between two powers, the ecclesiastical and the civil, the one being set over Divine, and the other over human things. Each in its kind is supreme, each has fixed limits within which it is contained, limits which are defined by the nature and special object of the province of each, so that there is, we may say, an orbit traced out within which the action of each is brought into play by its own native right. But in as much as each of these two powers has authority over the same subjects, and as it might come to pass that one and the same thing—related differently, but still remaining one and the same thing—might belong to the jurisdiction and determination of both, therefore God, who foresees all things, and who is the author of these two powers, has marked out the course of each in right correlation to the other. ... Were this not so, deplorable contentions and conflicts would often arise, and not infrequently men, like travellers at the meeting of two roads, would hesitate in anxiety and doubt, not knowing what course to follow. Two powers would be commanding contrary things, and it would be a dereliction of duty to disobey either of the two.
[...] Whatever is to be ranged under the civil and political order is rightly subject to the civil authority. Jesus Christ has Himself given command that what is Caesar's is to be rendered to Caesar, and that what belongs to God is to be rendered to God.
Leo quotes Augustine: "Thou teachest kings to look to the interests of their people, and dost admonish the people to be submissive to their kings. ... Thou showest that ... charity is owing to all, and wrongdoing to none."
Involvement in civic affairs.
Leo points out that actions may relate to private and domestic matters or to public matters. Regarding the former, the first duty is to conform life and conduct to the gospel precepts. He also exhorts the faithful to take a prudent part in public affairs for the common good. Furthermore, he says that it is in general "fitting and salutary" that Catholics should give their attention to national politics. To abdicate the field would allow those whose principles offer but small guarantee for the welfare of the State to more readily seize the reins of government.
However, "it is unlawful to follow one line of conduct in private life and another in public, respecting privately the authority of the Church, but publicly rejecting it; for this would amount to joining together good and evil, and to putting man in conflict with himself; whereas he ought always to be consistent, and never in the least point nor in any condition of life to swerve from Christian virtue." Catholics are admonished, by the very doctrines which they profess, to be upright and faithful in the discharge of duty.
It is furthermore, the duty of all Catholics to make use of popular institutions, so far as can honestly be done, for the advancement of truth and righteousness.
Summary.
According to the teaching of the Catholic Church, citizens are religiously bound to obey their civil rulers in all matters which belong to the sphere of civil government. That sphere comprises whatever may contribute to the temporal welfare of the whole body of citizens. As religion is a sacred duty and its practice contributes much to the well-being of the citizens, the State should not be entirely indifferent to religion. Still the direct care of religion has not been committed to the state but to the Church, which is independent of the State. Hence, there are limits set to the duty of civil allegiance. The State is not competent to make laws in matter of religion, nor may it interfere with the rights of the Church. If the State transgresses the limits assigned to it, the duty of obedience ceases: "We ought to obey God rather than men." Catholics are guided in matters of duty by the public teaching and law of the Catholic Church.