A Sunni leader in the Iraqi province of Diyala, who encouraged his community to confront al-Qaeda in Iraq, has been killed by the group, police say.
Many former Sunni insurgents have turned against al-Qaeda
The militants exploded a bomb in his house in the town of Kanaan, and fired mortars and rocket-propelled grenades at other houses and a Sunni mosque.
There are conflicting reports, but police in nearby Baquba said a total of 22 civilians died in the dawn attack.
The attackers then seized at least seven people before retreating.
Some of those kidnapped were women and children, residents said.
Baquba police chief Gen Ali Dilayan said dozens of suspected al-Qaeda in Iraq militants had attacked Kanaan early on Thursday morning.
The militants first attacked a police checkpoint and then fired mortars at the local Sunni mosque.
"They blew up the mosque then they bombed houses crowded with family members," he told the AFP news agency.
One of the houses belonged to Sheikh Yunis al-Tai, an imam well known in the area for his opposition to the al-Qaeda in Iraq, he said. They killed him and at least one of his family members and wounded others.
The home of another local sheikh was also attacked, but he was not there at the time.
Police then counterattacked with the support of gunmen from a rival group once allied to al-Qaeda in Iraq and drove the militants away, reports said.
Gen Dilayan said 22 of the attackers had been arrested south of Kanaan in an area known to be an al-Qaeda stronghold.
Until a few months ago, al-Qaeda in Iraq and other Sunni Arab insurgent groups were fighting side by side against Iraqi government and US-led forces.
But increasing numbers of the militants' former allies in the Sunni community have turned against them, mainly because they dislike the austere form of Islam that they practise.
The uprising began in the troubled Anbar province, once a stronghold of the Sunni insurgency, but has since spread to Diyala province, where the latest attacks took place, and some areas of Baghdad.