A bomb blast inside a Sunni mosque in central Iraq has killed at least 20 people, police and medics said.

The explosion took place at the Abu Bakr al-Sadiq mosque in the town of Wajihiya, east of Baquba, the capital of Diyala province, on Friday.

It was not clear who was behind the blast, which appeared to be part of a sustained campaign of attacks that has prompted fears of wider conflict in a country where ethnic Kurds and Shia and Sunni Muslims have yet to find a stable power-sharing compromise.

Sectarian tensions have been inflamed by the civil war in neighbouring Syria, which has drawn in Shia and Sunni fighters from Iraq and beyond to fight on opposite sides of the conflict.

Sunni groups, including the al-Qaeda-affiliated Islamic State of Iraq, have been regaining strength in recent months, security sources say.

Areas near Baquba have been hit by a number of attacks in recent days, including a bombing on Tuesday that targeted worshippers leaving a Sunni mosque in Muqdadiyah, northeast of the city, killing four people and wounding 15.

More than 460 people have been killed in attacks in July so far, according to violence monitoring group Iraq Body Count.