Those attacks occurred four days after a series of explosions killed 32 people and wounded nearly 100 in Shiite areas of Baghdad, raising fears that al-Qaida in Iraq is trying to provoke Sunni-Shiite reprisal killings now that the last of the American "surge" troops have left the country.
In the deadliest attack, a suicide car bomber detonated his explosives about 20 yards from a mosque in Zafaraniyah in southeastern Baghdad. The blast killed 14 people, including three Iraqi soldiers, and wounded 28, police said.
The death toll would likelier have been higher, but Iraqi soldiers prevented the attacker from driving closer to the mosque, police said.
"Pools of blood and the smell of burned flesh were everywhere and I saw a man of about 70 bleeding and lying on the ground," said Ammar Hashim, 25, whose brother was also wounded by broken glass in his shop.
In the other attack in the capital, a suicide bomber who appeared to be in his late teens detonated his explosive belt as worshippers were leaving the Rasoul mosque in the eastern New Baghdad district.
Ten people died and 24 were wounded, police and officials at al-Kindi and Ibn al-Nasif hospitals said. The dead included a guard who blocked the attacker from entering the mosque, police said.
The Iraqi army said 17 people were killed in the two blasts. But area hospitals said that figure did not include victims who died later from their wounds.
The attack on the Sunni family occurred in Diyala, a heavily mixed province north of the capital. Police said gunmen sprayed the family's vehicle with automatic weapons fire as they traveled to the provincial capital of Baqouba to visit relatives.
The dead included two children, three women and a man, police said. Another woman and her small child were wounded.
Police said the area was controlled by mostly Shiite security forces and that they suspected Shiite militiamen were responsible for the attack.
The police officials all spoke on condition of anonymity because they were not authorized to speak to the press.
Victims of the Baghdad attacks were attending prayers marking Eid al-Fitr, the religious holiday that comes at the end of Ramadan. Sunnis and other Shiite groups celebrated Eid al-Fitr earlier in the week.
Iraqi police and soldiers have been on alert for sectarian attacks around Ramadan, when devout Muslims fast from dawn until dusk and religious fervor runs high.
Last Sunday, five bombs exploded in Shiite areas of Baghdad, killing 32 people and wounding about 100. U.S. officials believed al-Qaida was behind the blasts.
Shiite cleric and lawmaker Jalaluddin al-Saghir blamed the mosque attacks on "the beasts of al-Qaida" that consider Shiites as religious heretics and collaborators with the Americans.
"After being weakened and isolated, the terrorists want to make a comeback in the capital and show that they are still powerful," al-Saghir told The Associated Press. "I think the al-Qaida efforts will fail because Iraqis now are more aware of the heavy price of any new round of sectarian violence."
The main Sunni political group, the Iraqi Islamic Party, joined in condemning the mosque attacks and called on Iraqis to unite against "those who want to transfer political disputes into the language of violence."
Bloody assaults on Shiite civilians helped trigger the massive wave of sectarian fighting that led to President Bush's decision to dispatch nearly 30,000 reinforcements to Iraq in 2007.
The last of those "surge" troops left Iraq in July after violence in the capital dropped to its lowest level in four years.
U.S. commanders have acknowledged a small increase in attacks recently in the Baghdad area as Iraqi forces assume a greater role in security. Late Thursday, a rocket or mortar shell exploded in the Green Zone, causing no injuries, the U.S. military said. It was the first known attack against the U.S.-protected area in weeks.
In a statement Thursday, U.N. special representative Staffan de Mistura expressed concern over the "recent spike in violence," urging Iraqis to maintain unity "in foiling the aims of those who want to push them back into the murderous cycle of sectarian violence."
Also Thursday, a bomb wounded four American soldiers in western Baghdad, according to U.S. military spokesman Lt. Col. Steven Stover. He gave no other details, but Baghdad police said the attacker detonated an explosive-laden car alongside a U.S. convoy.
Two Iraqi civilians were also wounded, a police official said on condition of anonymity because he was also not authorized to speak to the press.