(Adds second attack)
BAGHDAD, Jan 8 (Reuters) - Suicide bombs at two marketplaces in Baghdad, one of them claimed by Islamic State, killed at least 20 people on Sunday, police and medics said, the latest in a spate of militant attacks in the Iraqi capital that have left dozens dead.
In the first blast, the attacker drove an explosives-rigged car into a large vegetable market in the mainly Shi'ite district of Jamila, and detonated it after security forces opened fire to try to stop the vehicle, police sources said.
A suicide bomber wearing an explosive vest blew himself up a few hours later at a market in the mostly Shi'ite Baladiyat district.
The first blast killed 13, and the second blast killed seven people. More than 50 were wounded.
Islamic State claimed carrying out the first attack in an online statement, saying the bomber had targeted "a gathering of Shi'ites" in Jamila.
A series of attacks in Baghdad and other Iraqi cities have killed more than 80 people in just over a week.
Several have been claimed by the Sunni extremist Islamic State, which is coming under increasing pressure from a U.S.-backed offensive in Mosul, its last major stronghold in Iraq.
Iraqi forces advanced to within several hundred metres of the Tigris river than runs through Mosul on Saturday, as their operation against the militants gathers pace.
Islamic State is likely to resort to bomb attacks and similar tactics elsewhere in Iraq as it is driven out of its Mosul stronghold. (Reporting by Ahmed Rasheed and John Davison in Baghdad and Ahmed Tolba in Cairo; Editing by Raissa Kasolowsky)