Three bombs exploded in a commercial Baghdad district and another blast hit the city's western outskirts on Saturday, killing at least 13 people, police and hospital sources said.

The first blast hit Baghdad's central Bab al-Sharji district followed by two other explosions in a street nearby, in attacks highlighting the fact that violence is still troubling Iraq as the last U.S. troops prepare to withdraw at the end of the year.

A police source said the explosions killed at least seven people and wounded 29 others. Two other security sources said the blasts killed eight and wounded at least 13.

Earlier Saturday, six more people were killed and eight were wounded on the outskirts of Baghdad when a roadside bomb hit a truck carrying construction workers in Abu Ghraib to the west of the capital.

Attacks in Iraq have dropped sharply since the peak of sectarian slaughter in 2006-2007, but bombings, assaults and assassinations by Sunni Muslim insurgents and Shi'ite Muslim militias still occur nearly daily almost nine years after the U.S. invasion.

The remaining 18,000 U.S. troops in Iraq are packing up by the end of the year when a security pact with Baghdad expires. Talks to keep some U.S. troops in Iraq as trainers fell apart over the question of legal immunity for U.S. soldiers.

Iraqi and U.S. officials say Iraq's national military is capable of containing stubborn violence, but they are concerned about gaps the U.S. withdrawal will leave in their capabilities in areas like air defence and intelligence gathering.

(Reporting by Waleed Ibrahim and Kareem Raheem; Writing by Patrick Markey; Editing by Alessandra Rizzo)