39 It is paternal instinct, given by God, that thus turns with confidence to the Church, certain of finding in her the protection of family rights, thereby illustrating that harmony with which God has ordered all things. The Church is indeed conscious of her divine mission to all mankind, and of the obligation which all men have to practice the one true religion; and therefore she never tires of defending her right, and of reminding parents of their duty, to have all Catholic-born children baptized and brought up as Christians. On the other hand so jealous is she of the family's inviolable natural right to educate the children, that she never consents, save under peculiar circumstances and with special cautions, to baptize the children of infidels, or provide for their education against the will of the parents, till such time as the children can choose for themselves and freely embrace the Faith.
Source: Divini Illius Magistri (Vatican.va)