LAGOS, Nigeria — At least 12 people were killed, and 18 others injured, in a shooting during Mass at a Roman Catholic church in southeastern Nigeria on Sunday, according to local authorities and the Vatican.

Pope Francis was “deeply saddened” by the attack and invoked “the divine blessings of consolation and strength” upon the diocese, the Vatican’s secretary of state wrote in a message on Monday to Bishop Hilary Paul Odili Okeke of Nnewi, the diocese that includes the church.

The police commissioner for Anambra State, Garba Umar, said the shooting was “not unconnected to a kind of a ‘gang war’ ” involving drug lords active in both Nigeria and South Africa.

“We are dealing with a dangerous gang war that has spilled over to Anambra State from another African country,” the state’s governor, Willie Obiano, said after visiting the church and a hospital where victims of the shooting were being treated. “All of the shadowy characters behind this crime shall account for it,” he added. “This is the first and the last of this appalling crime.”