A suicide bomber detonating his explosives at a cafe in northern Iraq has killed more than 30 people and injured dozens more.

The blast in the ethnically mixed city of Kirkuk tore through a cafe where people had gathered after breaking their fast on the first Friday of Ramadan.

It was the latest in a string of bloody attacks that have hit Iraq over the start of the Muslim fasting month.

Hours before the Kirkuk attack, Sunni cleric Salah al-Nuaimi urged calm among Iraqis during a joint Sunni-Shia Friday sermon aimed at easing sectarian tensions.

"Enough is enough," al-Nuaimi told worshippers at a Baghdad mosque. "We all love Iraq, we are all Iraqis and we want to be united.

"We want to stop the bloodletting, and develop and build Iraq."

Kirkuk is rich in oil and lies on the frontline of a dispute between the Shia-led central government in Baghdad and ethnic Kurds who want the city to be incorporated into their autonomous region in the north of the country.

Arabs and Turkmen are opposed to this incorporation.

No one immediately claimed responsibility for the attack in Kirkuk or for other attacks that have taken place in recent days.

Earlier on Friday, a suicide car bomber struck a police patrol outside the northern city of Mosul, killing four policemen, a police officer and a medical official said.

At least 761 people were killed in armed attacks across Iraq in June, according to the United Nations.

On Thursday evening, at least 44 people were killed in bomb and gun attacks across Iraq.