At least 73 people have been killed after a Shia Muslim armed group opened fire inside an Iraqi Sunni mosque in the village of Bani Wais in the country's eastern Diyala province, medical sources have said.

A security source said bodies had been arriving at the hospital in the city of Baquba in Diyala province on Friday.

Footage posted later on YouTube appeared to show the dead strewn across the mosque floor, including the body of at least one child.

Al Jazeera's Jane Arraf, reporting from Erbil, said that according to local sources, the attack could have been in retaliation for a roadside bomb attack at a recruitment event organised by the same militia.

Such sectarian violence could hurt efforts by Iraq's new prime minister, moderate Shia Haider al-Abadi, to form a government that can unite Iraqis against the Islamic State group, the Sunni rebel group that has seized large parts of the country.

Two Sunni parliamentary blocs have suspended talks on forming a new Iraqi government to protest the attack.

The blocs affiliated with Parliament Speaker Salim al-Jabouri and Deputy Prime Minister Saleh al Mutlak are demanding that outgoing Prime Minister Nouri al-Maliki and the main Shia parliamentary bloc hand over the perpetrators within 48 hours and compensate the families of victims, the AP news agency reported.

Iraq's newly appointed prime minister condemned the attack on the mosque.

"I strongly condemn the killing of civilians and worshipers in Diyala province and I call on the citizens to reject these attempts by the enemies of Iraq to exploit the incident in order to stir up strife between the sons of the same homeland," he said.

Attacks on mosques 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-2007, the peak of a sectarian civil war.

In July, Shia armed groups executed 15 Sunni Muslims and then hung them from electricity poles in a public square in Baquba, police said.

Diyala police officials told the Reuters news agency they had provided Shia militias with names for hit lists so that suspected members of the Islamic State group could be tracked and executed.

Iraqi security forces killed more than 255 Sunni prisoners in July in apparent retaliation for killings of Shias by the Islamic State group, according to Human Rights Watch