One of those praying inside, 30-year-old Mohammed Faleh, said the blast struck as male worshippers, including children, were kneeling during communal prayers.
"I stood up to find blood-stained bodies lying on the ground. The Friday prayer turned into a disaster. Whoever left these bombs has no religion," he said.
Faleh said security forces found a second bomb left near the mosque that they rendered safe with a controlled detonation.
Between 250 to 300 people were inside the mosque when the bombing happened, said Sami Dawoud Salman, a member of the local Sahwa, a group of anti-al-Qaida Sunni militiaman that work alongside government security forces. He said the mosque was unguarded and that the local imam had been unsuccessful in getting increased protection.
"I'm asking the government for a solution. There's no security," survivor Jassim Dawoud said. "It's a disastrous situation."
Diyala province, where the attack occurred, was once the site of some of the fiercest fighting between U.S. forces and insurgents in Iraq. It remains a hotbed for terrorist attacks. The area is religiously mixed and witnessed some of the worst atrocities as Shiite militias battled Sunni insurgents for control in the years after the invasion.
"Terrorism is targeting all sects in Diyala mainly by attacking Sunni and Shiite mosques, funerals and football fields to draw the province into a sectarian conflict. All the victims were civilians," said Diyala provincial councilman Sadiq al-Husseini, appealing for calm. "I call on all Diyala residents to show self-restraint."
Police and hospital officials said that at least 22 people were killed and more than 50 were wounded in the mosque blast.
The U.S. Embassy condemned the mosque attack, saying that the fact it struck a place of worship during Ramadan "is especially despicable and cowardly and exposes the nature of those perpetrating these attacks."
Attacks outside the restive city of Mosul, 360 kilometers (225 miles) northwest of Baghdad, claimed four more lives. Two women died when mortar shells landed outside their house in nearby village, and a roadside bomb killed a father and son when it struck their car, authorities said.
The officials provided details of the attacks on condition of anonymity because they weren't authorized to release the information to media.
The attacks struck as Iran's outgoing president, Mahmoud Ahmadinejad, wrapped up a two-day trip to Iraq with visits to Shiite Muslim holy cities of Najaf and Karbala south of Baghdad. There was no indication the attacks were related to his trip.
Violence across Iraq has risen sharply since a heavy-handed crackdown by security forces on a Sunni protest camp in the northern town of Hawija on April 23. That raid followed months of rallies by Iraq's minority Sunnis against the Shiite-led government over what they contend is second-class treatment and the unfair use of tough anti-terrorism measures against their sect.
The surge in bloodshed has left more than 2,800 people dead and many more wounded since the start of April.
Attacks on Sunni mosques, for years a relatively rare target in Iraq, have picked up significantly in recent months.
There has been no claim of responsibility for Friday's bombing or many of the other recent attacks.
Sunni extremists such as al-Qaida's Iraq arm that seek to undermine the Shiite-led government are frequently blamed for bombing attacks targeting civilians. They could be behind the Sunni mosque bombings too, hoping to incite a sectarian backlash against Shiites. So could Shiite militias that have been remobilizing following years of relative quiet.
___
Associated Press writers Adam Schreck, Sinan Salaheddin and Sameer N. Yacoub contributed to this report.