The deadliest attack came when a car packed with explosives was detonated at an army checkpoint near the town of al-Nukhaib, an outpost on the route to western neighbors Syria and Saudi Arabia, killing at least seven soldiers, the sources said.
"Deash terrorists used a suicide car bomb attack to distract our soldiers and then they clashed with soldiers, but we managed to repel the attack," an army officer from Anbar operations command told Reuters.
Another six people were killed and 17 others wounded when a car bomb went off near Khilani Square in central Baghdad, police and medical sources said.
Six more people were killed in bomb attacks in Baghdad's predominantly Shi'ite districts of Amil, Hussainiya and Bayaa, the sources said.
A car bomb killed three people and wounded seven in the town of Mahmoudiya, about 30 km south of Baghdad, police sources said.
Elsewhere in Iraq, IsIS militants attacked Baiji, the country's largest refinery, on Saturday evening using mortars and machine guns fixed to pickup trucks, security officials said.
The assault came a day after the radical militants took partial control of a water dam and military barracks guarding it in Anbar and detonated three suicide car bombs at a border crossing between Iraq and Jordan.
"Daesh attacked the northern gate of the refinery, but we managed to repel the attack and prevented them from infiltrating our defences," an army officer from the refinery said by phone.