0310 GMT June 27, 2022
The bloodshed at St Francis Catholic Church in Owo town during a service was a rare assault in Nigeria's usually safer southwest and shocked a country grown used to terrorist assaults and mass kidnappings in the north, AFP reported.
Richard Olatunde, spokesman for the Ondo State governor's office, told AFP that dynamite exploded inside the church before gunmen opened fire on worshippers attending the service.
"They did not even enter the church, they were shooting through the windows," he said, confirming a death toll of 21 people.
National Emergency Management Agency local representative Olanrewaju Kadiri said 22 people were killed, including several children, with another 40 people wounded.
State lawmakers had said up to 50 people died in the attack.
The state government declared a seven-day mourning period for the victims, and ordered the national flag to be flown at half-mast in Ondo.
No group has so far claimed responsibility for the attack and the motives were not clear.
Nigeria's military is fighting a 12-year-long insurgency in the northeast and heavily armed criminal gangs often carry out looting raids and mass kidnappings in the northwest and north-central parts of the country. The conflict has killed 40,000 and displaced two million more.
But large-scale attacks in Nigeria's southwest are relatively rare, although kidnappings for ransom have become increasingly common.
President Muhammadu Buhari condemned Sunday's "heinous killing of worshippers" while Pope Francis offered prays for the victims.
The UN Special Representative for West Africa and the Sahel, Mahamat Saleh Annadif, also condemned what he called a "barbaric terrorist attack."