The death toll from a shooting attack by Shia militia forces on a Sunni mosque in Iraq on Friday has reached 68, a morgue official said.

A suicide bomber broke into the Musab bin Omair mosque in Imam Wais village in Diyala province, about 75 miles north-east of Baghdad, and detonated his explosives before gunmen rushed in and opened fire on worshippers, an army officer and a police officer said.

Ambulances transported the bodies to the town of Baquba, the main town in Diyala province, where Iranian-trained Shia militias are powerful and act with impunity.

Officials in Imam Wais said Iraqi security forces and local Shia militiamen had run to the scene following the mosque attack to reinforce security in the area, but were deterred by bombs planted by the militants, which allowed them to flee. Four Shia militiamen were killed and 13 wounded by the explosive devices.

Officials said Isis fighters had been trying to convince members of two prominent local Sunni tribes to join them but they had so far refused.

The bloodbath marks a setback for the prime minister designate, Haider al-Abadi, from the majority Shia community, who is seeking support from Sunnis and ethnic Kurds to take on the Isis insurgency threatening to tear Iraq apart.

Attacks on mosques are acutely sensitive and have in the past unleashed a deadly series of revenge killings and counter-attacks in Iraq, where violence has returned to the levels of 2006-07, the peak of a sectarian civil war.

In the northern city of Mosul, members of Isis stoned a man to death, witnesses said, as the United States raised the prospect of tackling jihadist safe havens across the border in Syria.

In a regional conflict which is throwing up dilemmas for governments from Washington to London to Baghdad and Tehran, any US action against Isis in Syria would risk making common cause with the Syrian president, Bashar al-Assad – the man it has wanted overthrown in a three-year uprising.

Isis, which this week released a video showing the murder of the American journalist James Foley, stoned the man to death in Mosul after one of its self-appointed courts sentenced him for adultery, the witnesses said.

The stoning, which happened on Thursday, was the first known instance of the punishment by Isis in Iraq since it seized large areas of the country in a June offensive.

Similar stonings by the group have been previously reported in Syria, where it split from al-Qaida.