Man cannot be exempted from his divinely-imposed obligations toward civil society, and the representatives of authority have the right to coerce him when he refuses without reason to do his duty. Society, on the other hand, cannot defraud man of his God-granted right... Nor can society systematically void these rights by making their use impossible.
On Atheistic Communism (Divini Redemptoris): Encyclical Letter of Pope Pius XI, March 19, 1937 (ed. 1949)