BAGHDAD - A truck bombing claimed by the Islamic State group killed at least 54 people in Baghdad Thursday, the deadliest single attack in the city in months.

The blast, which was likely aimed at undermining confidence in the government and stoking sectarian tensions, came after the outgoing US army chief warned that reconciliation in Iraq is becoming increasingly difficult and that the country may ultimately have to be partitioned.

The bomb went off in a wholesale vegetable market in the Sadr City area of north Baghdad at around 6:00 am (0300 GMT), peak time for shops buying vegetables for the day.

Interior ministry spokesman Brigadier General Saad Maan said the bombing killed 54 people and wounded 100. Medics collected human remains at the scene of the blast, an AFP photographer said.

The bombing devastated the market, ripping through buildings, killing horses used to transport vegetables, burning vehicles and leaving large amounts of produce scattered on the ground. IS claimed responsibility for what it termed the “blessed operation” in a statement posted online.

Bombings such as the Sadr City attack are a significant source of tension in Iraq and have worsened the country’s sectarian divide. General Raymond Odierno, who served as the top US commander in Iraq from 2008 to 2010, said Wednesday that the country may ultimately have to be divided up.

Asked about partition, he said: “I think that is for the region and politicians to figure out, diplomats to figure out how to work this, but that is something that could happen.” “It might be the only solution but I’m not ready to say that yet,” said Odierno.

Kurds dominate the country’s north and Shias the south, while the Arab population is distributed across western, northern and central Iraq. But for now, “we have to deal with (IS) first and decide what it will look like afterwards,” Odierno said.

IS overran large parts of Iraq in June 2014 and also holds significant territory in neighbouring Syria.

It has committed a slew of atrocities in both countries, including mass executions, kidnappings and rape.

The Iraqi army, which the United States spent billions of dollars to train and equip, performed dismally in the early days of the IS offensive.

Baghdad’s forces have since regained ground from the militants with backing from a US-led coalition and Iran, but much of the country’s west remains outside government control.

Even before the IS offensive, bombings targeting civilians in Iraq were a major threat, killing hundreds of people per month.

With militants occupied with fighting elsewhere, the frequency of blasts in Baghdad has declined since IS launched its offensive.

But bombings are still IS’s signature tactic, with the group planting explosives to help defend areas it holds and deploying suicide bombers as part of its offensive strategy.

The Baghdad blast came two days after bombings in Diyala province, northeast of the capital, killed more than 30 people. A massive suicide attack in the province killed more than 120 last month, one of the deadliest single bombings in Iraq since the 2003 US-led invasion.

On Thursday, Germany said that IS had carried out a chemical weapons attack against Kurdish fighters in northern Iraq, causing respiratory problems but no deaths.

IS has allegedly used chemical weapons on multiple occasions in Iraq and Syria, but such attacks have been limited and have had less impact than the deadly bombings carried out by the militants.