ROME — Pope Francis has declared the death penalty wrong in all cases, a definitive change in church teaching that is likely to challenge Catholic politicians, judges and officials who have argued that their church was not entirely opposed to capital punishment.

Before, church doctrine accepted the death penalty if it was “the only practicable way” to defend lives, an opening that some Catholics took as license to support capital punishment in many cases.

But Francis said executions were unacceptable in all cases because they are “an attack” on human dignity, the Vatican announced on Thursday, adding that the church would work “with determination” to abolish capital punishment worldwide.

Francis made the change to the Catechism of the Roman Catholic Church, the book of doctrine that is taught to Catholic children worldwide and studied by adults in a church with 1.2 billion members. Abolishing the death penalty has long been one of his top priorities, along with saving the environment and caring for immigrants and refugees.