More than 90 people have been killed in a suicide car bombing at a busy market in an Iraqi town.

The attack is one of the most deadly carried out by the so-called Islamic State group since they overran large parts of the country.

The blast brought down several buildings in Khan Bani Saad, about 30km northeast of Baghdad, killing people as they celebrated the end of Ramadan, police and medics said.

The attack took place in the mixed eastern province of Diyala where Khan Bani Saad is located. The so-called Islamic State group, said the target of the attack was "rejectionists", a term the militant group uses to refer to Shia Muslims.

Angry crowds went on a rampage after the explosion, smashing the windows of cars parked in the street in grief and anger.

An officer from the Diyala police command said rescue crews were still retrieving bodies from under the debris so the death toll could rise.

The Diyala provincial government declared three days' mourning and ordered all parks and entertainment places to close for the rest of the Eid al-Fitr holiday to pre-empt any further attacks.

Islamic State said in a statement issued on Twitter that the attack was to avenge the killing of Sunni Muslims in the northern Iraqi town of Hawija, and that the suicide car bomber was carrying around three tonnes of explosives.

Iraqi officials declared victory over Islamic State in Diyala earlier this year after security forces and Shia paramilitaries drove them out of towns and villages there, but the insurgents remain active in the province.

Security forces and militia groups are currently focused on the western province of Anbar, where they have been gearing upfor an offensive to retake the mainly Sunni governorate - Iraq's largest.

The United Nations said earlier this week that nearly 15,000 people had been killed in the 16-month period up to 30 April.

The US has condemned the attack which was carried out as the country marked Eid al-Fitr - the end of the Muslim holy fasting month of Ramadan.

The car bombing "purposefully and viciously targeted Iraqi civilians" celebrating the holiday, said National Security Council spokesman Ned Price.

"This latest attack is yet another painful example of the atrocities that the terrorist group ISIL continues to perpetrate against the people of Iraq," he added in a statement.

"The United States will continue to support the government of Iraq and its security forces to degrade and ultimately destroy this terrorist organization."